From: Thuna <thuna.cing@gmail.com>
To: 59360@debbugs.gnu.org
Subject: bug#59360: [PATCH] Highlight multiple symbols in single quotes in Common Lisp strings
Date: Fri, 18 Nov 2022 16:12:45 +0100 [thread overview]
Message-ID: <87k03suwia.fsf@gmail.com> (raw)
[-- 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
next reply other threads:[~2022-11-18 15:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 15:12 Thuna [this message]
2022-11-24 23:53 ` bug#59360: [PATCH] Highlight multiple symbols in single quotes in Common Lisp strings 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k03suwia.fsf@gmail.com \
--to=thuna.cing@gmail.com \
--cc=59360@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.