[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6b9510d94f8 2/3: Prefix syntax for , @ in elisp-mode (bug#44418)
From: |
Mattias Engdegård |
Subject: |
master 6b9510d94f8 2/3: Prefix syntax for , @ in elisp-mode (bug#44418) |
Date: |
Wed, 21 Jun 2023 12:00:45 -0400 (EDT) |
branch: master
commit 6b9510d94f814cacf43793dce76250b5f7e6f64a
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
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.
---
lisp/progmodes/elisp-mode.el | 3 +++
test/lisp/emacs-lisp/edebug-tests.el | 1 +
2 files changed, 4 insertions(+)
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