bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dot at start of symbols confuses edebug


From: Juri Linkov
Subject: Re: Dot at start of symbols confuses edebug
Date: Sun, 31 Oct 2004 02:02:32 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:
>     It seems there is no simple fix to support unusual variable names
>     in edebug.
>
> What is the difficulty?  Is it related to the way edebug inserts
> periods?

OK, I looked a little more and have found a simple fix.

The source of the problem is the function `edebug-next-token-class'
which assumes that the leading dot can start a symbol only if it is
followed by the digits.  That is wrong.  The dot can start a symbol
if it followed by all characters which can be part of the symbol:

Index: lisp/emacs-lisp/edebug.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/edebug.el,v
retrieving revision 3.69
diff -u -r3.69 edebug.el
--- lisp/emacs-lisp/edebug.el   10 Jun 2004 04:18:04 -0000      3.69
+++ lisp/emacs-lisp/edebug.el   30 Oct 2004 23:17:49 -0000
@@ -714,8 +714,10 @@
   (if (and (eq (following-char) ?.)
           (save-excursion
             (forward-char 1)
-            (and (>= (following-char) ?0)
-                 (<= (following-char) ?9))))
+            (or (and (eq (aref edebug-read-syntax-table (following-char))
+                         'symbol)
+                     (not (= (following-char) ?\;)))
+                (memq (following-char) '(?\, ?\.)))))
       'symbol
     (aref edebug-read-syntax-table (following-char))))

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]