]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefix syntax for ,@ in elisp-mode (bug#44418)
authorMattias Engdegård <mattiase@acm.org>
Wed, 21 Jun 2023 09:03:14 +0000 (11:03 +0200)
committerMattias Engdegård <mattiase@acm.org>
Wed, 21 Jun 2023 16:00:26 +0000 (18:00 +0200)
* lisp/progmodes/elisp-mode.el (elisp-mode-syntax-propertize):
Use prefix syntax for ,@ to avoid the @ becoming part of a symbol
that follows.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-normal-env):
Propertise inserted Lisp code to keep the test working.

lisp/progmodes/elisp-mode.el
test/lisp/emacs-lisp/edebug-tests.el

index 759b1ab4bafc57310ba943537f8a297340249cd2..955b708aee9cd60bbdfbf9ec91676cd718fb16f9 100644 (file)
@@ -254,6 +254,9 @@ Comments in the form will be lost."
       ;; Empty symbol.
       ("##" (0 (unless (nth 8 (syntax-ppss))
                  (string-to-syntax "_"))))
+      ;; Prevent the @ from becoming part of a following symbol.
+      (",@" (0 (unless (nth 8 (syntax-ppss))
+                 (string-to-syntax "'"))))
       ;; Unicode character names.  (The longest name is 88 characters
       ;; long.)
       ("\\?\\\\N{[-A-Za-z0-9 ]\\{,100\\}}"
index de2fff5ef1974f55e8a4518eb9bf57a8cf5be734..28a7f38c5765ad5d94454bfa66d7ed3925fb847c 100644 (file)
@@ -116,6 +116,7 @@ back to the top level.")
               (with-current-buffer (find-file edebug-tests-temp-file)
                 (read-only-mode)
                 (setq lexical-binding t)
+                (syntax-ppss)
                 (eval-buffer)
                 ,@body
                 (when edebug-tests-failure-in-post-command