]> git.eshelyaron.com Git - emacs.git/commitdiff
Highlight multiple symbols in single quotes in CL strings
authorThuna <thuna.cing@gmail.com>
Fri, 18 Nov 2022 14:56:38 +0000 (15:56 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 12 Feb 2025 10:52:39 +0000 (11:52 +0100)
* 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)

lisp/emacs-lisp/lisp-mode.el

index e2b5da52f95292d7003286e4c7f72be4d2653c9c..3663556d76ee5f8a42a10142a017657ca7b5ce8f 100644 (file)
@@ -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