Multiple definitions of `with-syntax-table' in 21.5 (was: [Bug: 21.5-b16] py-symbol-near-point broke between b9 and b16)
adrian at xemacs.org
Sun Apr 4 12:22:09 EDT 2004
Skip Montanaro <skip at pobox.com> writes:
> Python-mode.el has a function called py-symbol-near-point:
> (defun py-symbol-near-point ()
> "Return the first textual item to the nearest point."
> ;; alg stolen from etag.el
> (with-syntax-table py-dotted-expression-syntax-table
> (if (or (bobp) (not (memq (char-syntax (char-before)) '(?w ?_))))
> (while (not (looking-at "\\sw\\|\\s_\\|\\'"))
> (forward-char 1)))
> (while (looking-at "\\sw\\|\\s_")
> (forward-char 1))
> (if (re-search-backward "\\sw\\|\\s_" nil t)
> (progn (forward-char 1)
> (buffer-substring (point)
> (progn (forward-sexp -1)
> (while (looking-at "\\s'")
> (forward-char 1))
> which is used to identify python identifiers and dotted expressions. This
> broke sometime between 21.5-b9 and 21.5-b16. If dot is somewhere within
> it correctly returns "sys.getdefaultencoding" under b9 but returns nil under
> b16. Stepping through the function in both b9 and b16 using edebug suggests
> that (char-syntax (char-before)) returns ?\. in b16 when point is within a
> range of alphabetic characters and ?w in b9 under the same situation. That
> suggests that something changed with the interpretation of
`with-syntax-table' features in the CahngeLog entries of
as being New in subr.el.
However, in my
XEmacs 21.5 (beta17) "chayote" [Lucid] (i586-pc-win32, Mule) of Sun Apr 04 2004 on D5DC120J
M-x find-function RET with-syntax-table RET
takes me away to Line 1005 in help.el, onimously a defmacro.
Sure enough subr.el has a different versions of that same macro in
What shoobeedoo about this? One of the two must go, I'd say.
> Debugging this is way beyond my feeble skills. I didn't see any ChangeLog
> entries which seemed apropos, but I'm not real sure what to look for. I
> hope someone can connect the behavioral change with some changes in XEmacs.
mailto:adrian at xemacs.org
More information about the XEmacs-Beta