"Robert Pluim" <rpluim(a)gmail.com> writes:
Patch to paper over this problem follows. I suspect that
is actually at fault, but with this at least the test in http://mid.gmane.org/
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/subr.el,v
retrieving revision 1.39
diff -u - r1.39 subr.el
--- subr.el 2006/08/11 01:30:23 1.39
+++ subr.el 2007/03/13 09:03:05
＠＠ -607,7 +607,7 ＠＠
- (set-syntax-table (copy-syntax-table ,table))
+ (set-syntax-table ,table)
The idea of the copy probably was to have things like
`modify-syntax-entry' in `body' not have a lasting effect. I doubt
that this is actually the intent of the macro according to its doc
string: actually, it is quite likely that people would set up a syntax
(modify-syntax-entry ?x ?y)
The corresponding macro in Emacs, if I am not mistaken, is the
(defmacro with-syntax-table (table &rest body)
"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."
(declare (debug t))
(let ((old-table (make-symbol "table"))
(old-buffer (make-symbol "buffer")))
`(let ((,old-table (syntax-table))
I think it likely that copying the syntax table is a mistake, given
what people would expect from the doc string of the macro and given
that there is a non-trivial amount of code around which relies on the
So I don't think your patch is "papering over the problem", but rather
fixing it. I think it likely that `copy-syntax-table' works as
intended, and that it is just misused here.
XEmacs-Beta mailing list