"\\(([ \t']*\\)?" ;; An opening paren.
"\\(\\(setf\\)[ \t]+" (rx lisp-mode-symbol)
"\\|" (rx lisp-mode-symbol) "\\)?")
- (1 'font-lock-keyword-face)
+ (1 font-lock-keyword-face)
(3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type)))
- (cond ((eq type 'var) 'font-lock-variable-name-face)
- ((eq type 'type) 'font-lock-type-face)
+ (cond ((eq type 'var) font-lock-variable-name-face)
+ ((eq type 'type) font-lock-type-face)
;; If match-string 2 is non-nil, we encountered a
;; form like (defalias (intern (concat s "-p"))),
;; unless match-string 4 is also there. Then its a
((or (not (match-string 2)) ;; Normal defun.
(and (match-string 2) ;; Setf method.
(match-string 4)))
- 'font-lock-function-name-face)))
+ font-lock-function-name-face)))
nil t))
;; Emacs Lisp autoload cookies. Supports the slightly different
;; forms used by mh-e, calendar, etc.
- (,lisp-mode-autoload-regexp (3 'font-lock-warning-face prepend)
- (2 'font-lock-function-name-face prepend t)))
+ (,lisp-mode-autoload-regexp (3 font-lock-warning-face prepend)
+ (2 font-lock-function-name-face prepend t)))
"Subdued level highlighting for Emacs Lisp mode.")
(defconst lisp-cl-font-lock-keywords-1
"\\(([ \t']*\\)?" ;; An opening paren.
"\\(\\(setf\\)[ \t]+" (rx lisp-mode-symbol)
"\\|" (rx lisp-mode-symbol) "\\)?")
- (1 'font-lock-keyword-face)
+ (1 font-lock-keyword-face)
(3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type)))
- (cond ((eq type 'var) 'font-lock-variable-name-face)
- ((eq type 'type) 'font-lock-type-face)
+ (cond ((eq type 'var) font-lock-variable-name-face)
+ ((eq type 'type) font-lock-type-face)
((or (not (match-string 2)) ;; Normal defun.
(and (match-string 2) ;; Setf function.
(match-string 4)))
- 'font-lock-function-name-face)))
+ font-lock-function-name-face)))
nil t)))
"Subdued level highlighting for Lisp modes.")
(append
lisp-el-font-lock-keywords-1
`( ;; Regexp negated char group.
- ("\\[\\(\\^\\)" 1 'font-lock-negation-char-face prepend)
+ ("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)
;; Erroneous structures.
(,(concat "(" el-errs-re "\\_>")
- (1 'font-lock-warning-face))
+ (1 font-lock-warning-face))
;; Control structures. Common Lisp forms.
(lisp--el-match-keyword . 1)
;; Exit/Feature symbols as constants.
(,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\_>"
"[ \t']*\\(" (rx lisp-mode-symbol) "\\)?")
- (1 'font-lock-keyword-face)
- (2 'font-lock-constant-face nil t))
+ (1 font-lock-keyword-face)
+ (2 font-lock-constant-face nil t))
;; Words inside \\[], \\<>, \\{} or \\`' tend to be for
;; `substitute-command-keys'.
(,(rx "\\\\" (or (seq "["
;; allow multiple words, e.g. "C-x a"
lisp-mode-symbol (* " " lisp-mode-symbol))
"'")))
- (1 'font-lock-constant-face prepend))
+ (1 font-lock-constant-face prepend))
(,(rx "\\\\" (or (seq "<"
(group-n 1 (seq lisp-mode-symbol (not "\\"))) ">")
(seq "{"
(group-n 1 (seq lisp-mode-symbol (not "\\"))) "}")))
- (1 'font-lock-variable-name-face prepend))
+ (1 font-lock-variable-name-face prepend))
;; Ineffective backslashes (typically in need of doubling).
("\\(\\\\\\)\\([^\"\\]\\)"
(1 (elisp--font-lock-backslash) prepend))
;; Words inside ‘’, '' and `' tend to be symbol names.
(,(concat "[`‘']\\(" (rx lisp-mode-symbol) "\\)['’]")
- (1 'font-lock-constant-face prepend))
+ (1 font-lock-constant-face prepend))
;; \\= tends to be an escape in doc strings.
(,(rx "\\\\=")
- (0 'font-lock-builtin-face prepend))
+ (0 font-lock-builtin-face prepend))
;; Constant values.
(,(lambda (bound) (lisp-mode--search-key ":" bound))
- (0 'font-lock-builtin-face))
+ (0 font-lock-builtin-face))
;; ELisp and CLisp `&' keywords as types.
(,(lambda (bound) (lisp-mode--search-key "&" bound))
- (0 'font-lock-type-face))
+ (0 font-lock-type-face))
;; ELisp regexp grouping constructs
(,(lambda (bound)
(catch 'found
(1 'font-lock-regexp-grouping-backslash prepend)
(3 'font-lock-regexp-grouping-construct prepend))
(lisp--match-hidden-arg
- (0 '(face 'font-lock-warning-face
+ (0 '(face font-lock-warning-face
help-echo "Easy to misread; consider moving the element to the next line")
prepend))
(lisp--match-confusable-symbol-character
- 0 '(face 'font-lock-warning-face
+ 0 '(face font-lock-warning-face
help-echo "Confusable character"))
))
"Gaudy level highlighting for Emacs Lisp mode.")
(append
lisp-cl-font-lock-keywords-1
`( ;; Regexp negated char group.
- ("\\[\\(\\^\\)" 1 'font-lock-negation-char-face prepend)
+ ("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)
;; Control structures. Common Lisp forms.
(,(concat "(" cl-kws-re "\\_>") . 1)
;; Exit/Feature symbols as constants.
(,(concat "(\\(catch\\|throw\\|provide\\|require\\)\\_>"
"[ \t']*\\(" (rx lisp-mode-symbol) "\\)?")
- (1 'font-lock-keyword-face)
- (2 'font-lock-constant-face nil t))
+ (1 font-lock-keyword-face)
+ (2 font-lock-constant-face nil t))
;; Erroneous structures.
(,(concat "(" cl-errs-re "\\_>")
- (1 'font-lock-warning-face))
+ (1 font-lock-warning-face))
;; Words inside ‘’ and `' tend to be symbol names.
(,(concat "[`‘]\\(" (rx lisp-mode-symbol) "\\)['’]")
- (1 'font-lock-constant-face prepend))
+ (1 font-lock-constant-face prepend))
;; Uninterned symbols, e.g., (defpackage #:my-package ...)
;; must come before keywords below to have effect
- (,(concat "#:" (rx lisp-mode-symbol) "") 0 'font-lock-builtin-face)
+ (,(concat "#:" (rx lisp-mode-symbol) "") 0 font-lock-builtin-face)
;; Constant values.
(,(lambda (bound) (lisp-mode--search-key ":" bound))
- (0 'font-lock-builtin-face))
+ (0 font-lock-builtin-face))
;; ELisp and CLisp `&' keywords as types.
(,(lambda (bound) (lisp-mode--search-key "&" bound))
- (0 'font-lock-type-face))
+ (0 font-lock-type-face))
;; ELisp regexp grouping constructs
;; This is too general -- rms.
;; A user complained that he has functions whose names start with `do'
;; That user has violated the https://www.cliki.net/Naming+conventions:
;; CL (but not EL!) `with-' (context) and `do-' (iteration)
(,(concat "(\\(\\(do-\\|with-\\)" (rx lisp-mode-symbol) "\\)")
- (1 'font-lock-keyword-face))
+ (1 font-lock-keyword-face))
(lisp--match-hidden-arg
- (0 '(face 'font-lock-warning-face
+ (0 '(face font-lock-warning-face
help-echo "Easy to misread; consider moving the element to the next line")
prepend))
))