all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#59360: [PATCH] Highlight multiple symbols in single quotes in Common Lisp strings
@ 2022-11-18 15:12 Thuna
  2022-11-24 23:53 ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Thuna @ 2022-11-18 15:12 UTC (permalink / raw)
  To: 59360

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

Severity: wishlist

This is mostly useful for quoting Hyperspec glossary entries.  I only
patched it for Common Lisp to avoid possibly breaking help buffers for
elisp.


[-- Attachment #2: the patch --]
[-- Type: text/x-patch, Size: 1234 bytes --]

From 9a22e65b102835244a3e529618cd1f1e735f5d60 Mon Sep 17 00:00:00 2001
From: Thuna <thuna.cing@gmail.com>
Date: Fri, 18 Nov 2022 15:56:38 +0100
Subject: [PATCH] Highlight multiple symbols in single quotes in Common Lisp
 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.
---
 lisp/emacs-lisp/lisp-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 7e39a77aed..1e1dbf3eb4 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -557,7 +557,7 @@ lisp-mode--search-key
          (,(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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-03  0:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 15:12 bug#59360: [PATCH] Highlight multiple symbols in single quotes in Common Lisp strings Thuna
2022-11-24 23:53 ` Stefan Kangas
2022-11-25 14:24   ` Thuna
2022-11-26  8:24     ` Stefan Kangas
2022-11-26 12:20       ` Thuna
2022-12-03  0:58         ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.