Multiple definitions of `with-syntax-table' in 21.5 (was: [Bug: 21.5-b16] py-symbol-near-point broke between b9 and b16)

Adrian Aichner 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
>       (save-excursion
>         (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))
>                                               (point))))
>             nil))))
>
> 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
>
>     sys.getdefaultencoding
>
> 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
> py-dotted-expression-syntax-table.

Hi Skip!

`with-syntax-table' features in the CahngeLog entries of
http://www.xemacs.org/Releases/21.5.12.html#lisp:ChangeLog
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
21.5-b17!

What shoobeedoo about this?  One of the two must go, I'd say.

Best regards,

Adrian

>
> 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.

-- 
Adrian Aichner
 mailto:adrian at xemacs.org
 http://www.xemacs.org/




More information about the XEmacs-Beta mailing list