From: Thuna Date: Fri, 18 Nov 2022 14:56:38 +0000 (+0100) Subject: Highlight multiple symbols in single quotes in CL strings X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a70d1d6ebd33a593adf0f2a2438884afc8a78926;p=emacs.git Highlight multiple symbols in single quotes in CL strings * lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2): When multiple space-delimited symbols are single quoted together (e.g "`foo bar'"), highlight them. (Bug#59360) (cherry picked from commit 32700f38fdd279cb79e3b78b35cb8666f5cd08a7) --- diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index e2b5da52f95..3663556d76e 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -556,7 +556,9 @@ This will generate compile-time constants from BINDINGS." (,(concat "(" cl-errs-re "\\_>") (1 font-lock-warning-face)) ;; Words inside ‘’ and `' tend to be symbol names. - (,(concat "[`‘]\\(" (rx lisp-mode-symbol) "\\)['’]") + (,(concat "[`‘]\\(" + (rx (* lisp-mode-symbol (+ space)) lisp-mode-symbol) + "\\)['’]") (1 font-lock-constant-face prepend)) ;; Uninterned symbols, e.g., (defpackage #:my-package ...) ;; must come before keywords below to have effect