Simplify lisp-el-font-lock-keywords-2 definition slightly
* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Simplify slightly.
This commit is contained in:
parent
05297e40c0
commit
ae3416d694
1 changed files with 6 additions and 8 deletions
|
@ -478,17 +478,15 @@ This will generate compile-time constants from BINDINGS."
|
|||
(2 font-lock-constant-face nil t))
|
||||
;; Words inside \\[], \\<>, \\{} or \\`' tend to be for
|
||||
;; `substitute-command-keys'.
|
||||
(,(rx "\\\\[" (group (regexp lisp-mode-symbol-regexp)) "]")
|
||||
(,(rx "\\\\" (or (seq "[" (group-n 1 (regexp lisp-mode-symbol-regexp)) "]")
|
||||
(seq "`" (group-n 1 (+ (regexp lisp-mode-symbol-regexp)
|
||||
;; allow multiple words, e.g. "C-x a"
|
||||
(? " ")))
|
||||
"'")))
|
||||
(1 font-lock-constant-face prepend))
|
||||
(,(rx "\\\\" (or (seq "<" (group-n 1 (regexp lisp-mode-symbol-regexp)) ">")
|
||||
(seq "{" (group-n 1 (regexp lisp-mode-symbol-regexp)) "}")))
|
||||
(1 font-lock-variable-name-face prepend))
|
||||
(,(rx "\\\\`" (group
|
||||
(+ (regexp lisp-mode-symbol-regexp)
|
||||
;; allow multiple words, e.g. "C-x a"
|
||||
(? " ")))
|
||||
"'")
|
||||
(1 font-lock-constant-face prepend))
|
||||
;; Ineffective backslashes (typically in need of doubling).
|
||||
("\\(\\\\\\)\\([^\"\\]\\)"
|
||||
(1 (elisp--font-lock-backslash) prepend))
|
||||
|
@ -496,7 +494,7 @@ This will generate compile-time constants from BINDINGS."
|
|||
(,(concat "[`‘']\\(" lisp-mode-symbol-regexp "\\)['’]")
|
||||
(1 font-lock-constant-face prepend))
|
||||
;; \\= tends to be an escape in doc strings.
|
||||
("\\\\\\\\="
|
||||
(,(rx "\\\\=")
|
||||
(0 font-lock-builtin-face prepend))
|
||||
;; Constant values.
|
||||
(,(concat "\\_<:" lisp-mode-symbol-regexp "\\_>")
|
||||
|
|
Loading…
Add table
Reference in a new issue