aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2024-11-16 16:21:36 +0200
committerEli Zaretskii2024-11-16 16:21:36 +0200
commit200c877cd48aa0f7638fdd5157555374f0f7bfc8 (patch)
treee53bb5b01d96aab225fc14acdbf05b1f726c5e52
parentf630520be97a9dda5e4b93765dbd82b6e9b298d0 (diff)
downloademacs-200c877cd48aa0f7638fdd5157555374f0f7bfc8.tar.gz
emacs-200c877cd48aa0f7638fdd5157555374f0f7bfc8.zip
Fix font-lock in 'lisp-mode'
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Fix regexps for "\\<>" and similar constructs. (Bug#74307)
-rw-r--r--lisp/emacs-lisp/lisp-mode.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 220bb5175ea..99980a44ddf 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -490,14 +490,17 @@ This will generate compile-time constants from BINDINGS."
490 (2 font-lock-constant-face nil t)) 490 (2 font-lock-constant-face nil t))
491 ;; Words inside \\[], \\<>, \\{} or \\`' tend to be for 491 ;; Words inside \\[], \\<>, \\{} or \\`' tend to be for
492 ;; `substitute-command-keys'. 492 ;; `substitute-command-keys'.
493 (,(rx "\\\\" (or (seq "[" (group-n 1 lisp-mode-symbol) "]") 493 (,(rx "\\\\" (or (seq "["
494 (group-n 1 lisp-mode-symbol) (not "\\") "]")
494 (seq "`" (group-n 1 495 (seq "`" (group-n 1
495 ;; allow multiple words, e.g. "C-x a" 496 ;; allow multiple words, e.g. "C-x a"
496 lisp-mode-symbol (* " " lisp-mode-symbol)) 497 lisp-mode-symbol (* " " lisp-mode-symbol))
497 "'"))) 498 "'")))
498 (1 font-lock-constant-face prepend)) 499 (1 font-lock-constant-face prepend))
499 (,(rx "\\\\" (or (seq "<" (group-n 1 lisp-mode-symbol) ">") 500 (,(rx "\\\\" (or (seq "<"
500 (seq "{" (group-n 1 lisp-mode-symbol) "}"))) 501 (group-n 1 lisp-mode-symbol) (not "\\") ">")
502 (seq "{"
503 (group-n 1 lisp-mode-symbol) (not "\\") "}")))
501 (1 font-lock-variable-name-face prepend)) 504 (1 font-lock-variable-name-face prepend))
502 ;; Ineffective backslashes (typically in need of doubling). 505 ;; Ineffective backslashes (typically in need of doubling).
503 ("\\(\\\\\\)\\([^\"\\]\\)" 506 ("\\(\\\\\\)\\([^\"\\]\\)"