From: Mattias EngdegÄrd Date: Wed, 21 Jun 2023 09:03:14 +0000 (+0200) Subject: Prefix syntax for ,@ in elisp-mode (bug#44418) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b9510d94f814cacf43793dce76250b5f7e6f64a;p=emacs.git Prefix syntax for ,@ in elisp-mode (bug#44418) * 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. --- diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 759b1ab4baf..955b708aee9 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -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\\}}" diff --git a/test/lisp/emacs-lisp/edebug-tests.el b/test/lisp/emacs-lisp/edebug-tests.el index de2fff5ef19..28a7f38c576 100644 --- a/test/lisp/emacs-lisp/edebug-tests.el +++ b/test/lisp/emacs-lisp/edebug-tests.el @@ -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