Highlight uninterned symbols.
* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2): Highlight uninterned symbols, often used as string designators to avoid namespace pollution (https://stackoverflow.com/a/46981940/850781).
This commit is contained in:
parent
e85586abd1
commit
bae7a63b80
1 changed files with 5 additions and 0 deletions
|
@ -491,6 +491,11 @@ This will generate compile-time constants from BINDINGS."
|
|||
(,(concat "[`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
|
||||
lisp-mode-symbol-regexp "\\)['’]")
|
||||
(1 font-lock-constant-face prepend))
|
||||
;; Uninterned symbols, e.g., (defpackage #:my-package ...)
|
||||
;; must come before keywords below to have effect
|
||||
(,(concat "\\(#:\\)\\(" lisp-mode-symbol-regexp "\\)")
|
||||
(1 font-lock-comment-delimiter-face)
|
||||
(2 font-lock-doc-face))
|
||||
;; Constant values.
|
||||
(,(concat "\\_<:" lisp-mode-symbol-regexp "\\_>")
|
||||
(0 font-lock-builtin-face))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue