[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scheme.el bug & fix
From: |
Stefan Monnier |
Subject: |
Re: scheme.el bug & fix |
Date: |
Sun, 16 Feb 2003 18:53:46 -0500 |
> The problem is that `scheme-mode-syntax-table' is not initialized
> with the syntax-table built in the let form, but with a standard
> syntax table.
It turns out the problem is that
(with-syntax-table st (modify-syntex-entry foo bar))
does not modify `st' because `with-syntax-table' does not use `st'
but a copy of it. Actually it's even documented in the docstring.
This sounds silly. Does anybody have an idea why it is defined that way ?
If not, any objection the patch below which should also improve
(very marginally) the performance of Emacs ?
Stefan
--- subr.el 4 Feb 2003 12:06:43 -0000 1.340
+++ subr.el 16 Feb 2003 23:52:07 -0000
@@ -1709,7 +1743,7 @@
parent))
(defmacro with-syntax-table (table &rest body)
- "Evaluate BODY with syntax table of current buffer set to a copy of TABLE.
+ "Evaluate BODY with syntax table of current buffer set to TABLE.
The syntax table of the current buffer is saved, BODY is evaluated, and the
saved table is restored, even in case of an abnormal exit.
Value is what BODY returns."
@@ -1719,7 +1753,7 @@
(,old-buffer (current-buffer)))
(unwind-protect
(progn
- (set-syntax-table (copy-syntax-table ,table))
+ (set-syntax-table ,table)
,@body)
(save-current-buffer
(set-buffer ,old-buffer)
- scheme.el bug & fix, David PONCE, 2003/02/14
- Re: scheme.el bug & fix,
Stefan Monnier <=
- Re: scheme.el bug & fix, Luc Teirlinck, 2003/02/16
- Re: scheme.el bug & fix, Stefan Monnier, 2003/02/17
- Re: scheme.el bug & fix, Luc Teirlinck, 2003/02/17
- Re: scheme.el bug & fix, Stefan Monnier, 2003/02/18
- Re: scheme.el bug & fix, Richard Stallman, 2003/02/19
- Re: scheme.el bug & fix, Stefan Monnier, 2003/02/19
- Re: scheme.el bug & fix, Miles Bader, 2003/02/19