From: Juri Linkov Date: Thu, 5 Dec 2024 18:15:12 +0000 (+0200) Subject: * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Fix font-lock (bug#74307). X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0c9c5bd922ed440cb302e020c45581c2df22ada2;p=emacs.git * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Fix font-lock (bug#74307). Move '(not "\\")' inside the group to not exclude the last character for "\\<>" and similar constructs. (cherry picked from commit 61d06762975fb203ae06a57d30397d699164ebc1) --- diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index e49c8d3aa63..dfbd2178258 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -488,16 +488,16 @@ This will generate compile-time constants from BINDINGS." ;; Words inside \\[], \\<>, \\{} or \\`' tend to be for ;; `substitute-command-keys'. (,(rx "\\\\" (or (seq "[" - (group-n 1 lisp-mode-symbol) (not "\\") "]") + (group-n 1 (seq lisp-mode-symbol (not "\\"))) "]") (seq "`" (group-n 1 ;; allow multiple words, e.g. "C-x a" lisp-mode-symbol (* " " lisp-mode-symbol)) "'"))) (1 font-lock-constant-face prepend)) (,(rx "\\\\" (or (seq "<" - (group-n 1 lisp-mode-symbol) (not "\\") ">") + (group-n 1 (seq lisp-mode-symbol (not "\\"))) ">") (seq "{" - (group-n 1 lisp-mode-symbol) (not "\\") "}"))) + (group-n 1 (seq lisp-mode-symbol (not "\\"))) "}"))) (1 font-lock-variable-name-face prepend)) ;; Ineffective backslashes (typically in need of doubling). ("\\(\\\\\\)\\([^\"\\]\\)"