diff options
| author | Gerd Moellmann | 1999-11-21 15:08:37 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-11-21 15:08:37 +0000 |
| commit | c29cefdfa0bdaf07067afa074c89adf120c1b1f9 (patch) | |
| tree | b8d3f6a15642ba53a12b53fba40513ed27de0c23 | |
| parent | d8f1319a795ea3a63222eeb943f5023b8462ac38 (diff) | |
| download | emacs-c29cefdfa0bdaf07067afa074c89adf120c1b1f9.tar.gz emacs-c29cefdfa0bdaf07067afa074c89adf120c1b1f9.zip | |
(with-syntax-table): Don't switch buffers.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/simple.el | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e701e21a873..fadfd09a6f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 1999-11-21 Gerd Moellmann <gerd@gnu.org> | 1 | 1999-11-21 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * simple.el (with-syntax-table): Don't switch buffers. | ||
| 4 | |||
| 3 | * emacs-lisp/edebug.el, emacs-lisp/cust-print.el, | 5 | * emacs-lisp/edebug.el, emacs-lisp/cust-print.el, |
| 4 | progmodes/hideif.el: Use new backquote syntax. | 6 | progmodes/hideif.el: Use new backquote syntax. |
| 5 | 7 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index bc78fc66f99..c1fa29bec62 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4142,8 +4142,8 @@ after it has been set up properly in other respects." | |||
| 4142 | 4142 | ||
| 4143 | (defmacro with-syntax-table (table &rest body) | 4143 | (defmacro with-syntax-table (table &rest body) |
| 4144 | "Evaluate BODY with syntax table of current buffer set to a copy of TABLE. | 4144 | "Evaluate BODY with syntax table of current buffer set to a copy of TABLE. |
| 4145 | Current buffer and syntax table are saved, BODY is evaluated, and the | 4145 | The syntax table of the current buffer is saved, BODY is evaluated, and the |
| 4146 | saved values are restored, even in case of an abnormal exit. | 4146 | saved table is restored, even in case of an abnormal exit. |
| 4147 | Value is what BODY returns." | 4147 | Value is what BODY returns." |
| 4148 | (let ((old-table (gensym)) | 4148 | (let ((old-table (gensym)) |
| 4149 | (old-buffer (gensym))) | 4149 | (old-buffer (gensym))) |
| @@ -4153,8 +4153,9 @@ Value is what BODY returns." | |||
| 4153 | (progn | 4153 | (progn |
| 4154 | (set-syntax-table (copy-syntax-table ,table)) | 4154 | (set-syntax-table (copy-syntax-table ,table)) |
| 4155 | ,@body) | 4155 | ,@body) |
| 4156 | (set-buffer ,old-buffer) | 4156 | (save-current-buffer |
| 4157 | (set-syntax-table ,old-table))))) | 4157 | (set-buffer ,old-buffer) |
| 4158 | (set-syntax-table ,old-table)))))) | ||
| 4158 | 4159 | ||
| 4159 | (put 'with-syntax-table 'lisp-indent-function 1) | 4160 | (put 'with-syntax-table 'lisp-indent-function 1) |
| 4160 | (put 'with-syntax-table 'edebug-form-spec '(form body)) | 4161 | (put 'with-syntax-table 'edebug-form-spec '(form body)) |