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)
This commit is contained in:
Thuna 2022-11-18 15:56:38 +01:00 committed by Stefan Kangas
parent fb90e21af1
commit 32700f38fd

View file

@ -559,7 +559,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