mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Revert "Don't use obsolete face variables in lisp-mode.el"
This reverts commit ba60fa3dea.
This commit is contained in:
parent
bf97946d7d
commit
a001202b99
1 changed files with 32 additions and 32 deletions
|
|
@ -433,10 +433,10 @@ This will generate compile-time constants from BINDINGS."
|
||||||
"\\(([ \t']*\\)?" ;; An opening paren.
|
"\\(([ \t']*\\)?" ;; An opening paren.
|
||||||
"\\(\\(setf\\)[ \t]+" (rx lisp-mode-symbol)
|
"\\(\\(setf\\)[ \t]+" (rx lisp-mode-symbol)
|
||||||
"\\|" (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)))
|
(3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type)))
|
||||||
(cond ((eq type 'var) 'font-lock-variable-name-face)
|
(cond ((eq type 'var) font-lock-variable-name-face)
|
||||||
((eq type 'type) 'font-lock-type-face)
|
((eq type 'type) font-lock-type-face)
|
||||||
;; If match-string 2 is non-nil, we encountered a
|
;; If match-string 2 is non-nil, we encountered a
|
||||||
;; form like (defalias (intern (concat s "-p"))),
|
;; form like (defalias (intern (concat s "-p"))),
|
||||||
;; unless match-string 4 is also there. Then its a
|
;; unless match-string 4 is also there. Then its a
|
||||||
|
|
@ -444,12 +444,12 @@ This will generate compile-time constants from BINDINGS."
|
||||||
((or (not (match-string 2)) ;; Normal defun.
|
((or (not (match-string 2)) ;; Normal defun.
|
||||||
(and (match-string 2) ;; Setf method.
|
(and (match-string 2) ;; Setf method.
|
||||||
(match-string 4)))
|
(match-string 4)))
|
||||||
'font-lock-function-name-face)))
|
font-lock-function-name-face)))
|
||||||
nil t))
|
nil t))
|
||||||
;; Emacs Lisp autoload cookies. Supports the slightly different
|
;; Emacs Lisp autoload cookies. Supports the slightly different
|
||||||
;; forms used by mh-e, calendar, etc.
|
;; forms used by mh-e, calendar, etc.
|
||||||
(,lisp-mode-autoload-regexp (3 'font-lock-warning-face prepend)
|
(,lisp-mode-autoload-regexp (3 font-lock-warning-face prepend)
|
||||||
(2 'font-lock-function-name-face prepend t)))
|
(2 font-lock-function-name-face prepend t)))
|
||||||
"Subdued level highlighting for Emacs Lisp mode.")
|
"Subdued level highlighting for Emacs Lisp mode.")
|
||||||
|
|
||||||
(defconst lisp-cl-font-lock-keywords-1
|
(defconst lisp-cl-font-lock-keywords-1
|
||||||
|
|
@ -460,14 +460,14 @@ This will generate compile-time constants from BINDINGS."
|
||||||
"\\(([ \t']*\\)?" ;; An opening paren.
|
"\\(([ \t']*\\)?" ;; An opening paren.
|
||||||
"\\(\\(setf\\)[ \t]+" (rx lisp-mode-symbol)
|
"\\(\\(setf\\)[ \t]+" (rx lisp-mode-symbol)
|
||||||
"\\|" (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)))
|
(3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type)))
|
||||||
(cond ((eq type 'var) 'font-lock-variable-name-face)
|
(cond ((eq type 'var) font-lock-variable-name-face)
|
||||||
((eq type 'type) 'font-lock-type-face)
|
((eq type 'type) font-lock-type-face)
|
||||||
((or (not (match-string 2)) ;; Normal defun.
|
((or (not (match-string 2)) ;; Normal defun.
|
||||||
(and (match-string 2) ;; Setf function.
|
(and (match-string 2) ;; Setf function.
|
||||||
(match-string 4)))
|
(match-string 4)))
|
||||||
'font-lock-function-name-face)))
|
font-lock-function-name-face)))
|
||||||
nil t)))
|
nil t)))
|
||||||
"Subdued level highlighting for Lisp modes.")
|
"Subdued level highlighting for Lisp modes.")
|
||||||
|
|
||||||
|
|
@ -477,17 +477,17 @@ This will generate compile-time constants from BINDINGS."
|
||||||
(append
|
(append
|
||||||
lisp-el-font-lock-keywords-1
|
lisp-el-font-lock-keywords-1
|
||||||
`( ;; Regexp negated char group.
|
`( ;; Regexp negated char group.
|
||||||
("\\[\\(\\^\\)" 1 'font-lock-negation-char-face prepend)
|
("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)
|
||||||
;; Erroneous structures.
|
;; Erroneous structures.
|
||||||
(,(concat "(" el-errs-re "\\_>")
|
(,(concat "(" el-errs-re "\\_>")
|
||||||
(1 'font-lock-warning-face))
|
(1 font-lock-warning-face))
|
||||||
;; Control structures. Common Lisp forms.
|
;; Control structures. Common Lisp forms.
|
||||||
(lisp--el-match-keyword . 1)
|
(lisp--el-match-keyword . 1)
|
||||||
;; Exit/Feature symbols as constants.
|
;; Exit/Feature symbols as constants.
|
||||||
(,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\_>"
|
(,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\_>"
|
||||||
"[ \t']*\\(" (rx lisp-mode-symbol) "\\)?")
|
"[ \t']*\\(" (rx lisp-mode-symbol) "\\)?")
|
||||||
(1 'font-lock-keyword-face)
|
(1 font-lock-keyword-face)
|
||||||
(2 'font-lock-constant-face nil t))
|
(2 font-lock-constant-face nil t))
|
||||||
;; Words inside \\[], \\<>, \\{} or \\`' tend to be for
|
;; Words inside \\[], \\<>, \\{} or \\`' tend to be for
|
||||||
;; `substitute-command-keys'.
|
;; `substitute-command-keys'.
|
||||||
(,(rx "\\\\" (or (seq "["
|
(,(rx "\\\\" (or (seq "["
|
||||||
|
|
@ -496,27 +496,27 @@ This will generate compile-time constants from BINDINGS."
|
||||||
;; allow multiple words, e.g. "C-x a"
|
;; allow multiple words, e.g. "C-x a"
|
||||||
lisp-mode-symbol (* " " lisp-mode-symbol))
|
lisp-mode-symbol (* " " lisp-mode-symbol))
|
||||||
"'")))
|
"'")))
|
||||||
(1 'font-lock-constant-face prepend))
|
(1 font-lock-constant-face prepend))
|
||||||
(,(rx "\\\\" (or (seq "<"
|
(,(rx "\\\\" (or (seq "<"
|
||||||
(group-n 1 (seq lisp-mode-symbol (not "\\"))) ">")
|
(group-n 1 (seq lisp-mode-symbol (not "\\"))) ">")
|
||||||
(seq "{"
|
(seq "{"
|
||||||
(group-n 1 (seq lisp-mode-symbol (not "\\"))) "}")))
|
(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).
|
;; Ineffective backslashes (typically in need of doubling).
|
||||||
("\\(\\\\\\)\\([^\"\\]\\)"
|
("\\(\\\\\\)\\([^\"\\]\\)"
|
||||||
(1 (elisp--font-lock-backslash) prepend))
|
(1 (elisp--font-lock-backslash) prepend))
|
||||||
;; Words inside ‘’, '' and `' tend to be symbol names.
|
;; Words inside ‘’, '' and `' tend to be symbol names.
|
||||||
(,(concat "[`‘']\\(" (rx lisp-mode-symbol) "\\)['’]")
|
(,(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.
|
;; \\= tends to be an escape in doc strings.
|
||||||
(,(rx "\\\\=")
|
(,(rx "\\\\=")
|
||||||
(0 'font-lock-builtin-face prepend))
|
(0 font-lock-builtin-face prepend))
|
||||||
;; Constant values.
|
;; Constant values.
|
||||||
(,(lambda (bound) (lisp-mode--search-key ":" bound))
|
(,(lambda (bound) (lisp-mode--search-key ":" bound))
|
||||||
(0 'font-lock-builtin-face))
|
(0 font-lock-builtin-face))
|
||||||
;; ELisp and CLisp `&' keywords as types.
|
;; ELisp and CLisp `&' keywords as types.
|
||||||
(,(lambda (bound) (lisp-mode--search-key "&" bound))
|
(,(lambda (bound) (lisp-mode--search-key "&" bound))
|
||||||
(0 'font-lock-type-face))
|
(0 font-lock-type-face))
|
||||||
;; ELisp regexp grouping constructs
|
;; ELisp regexp grouping constructs
|
||||||
(,(lambda (bound)
|
(,(lambda (bound)
|
||||||
(catch 'found
|
(catch 'found
|
||||||
|
|
@ -534,11 +534,11 @@ This will generate compile-time constants from BINDINGS."
|
||||||
(1 'font-lock-regexp-grouping-backslash prepend)
|
(1 'font-lock-regexp-grouping-backslash prepend)
|
||||||
(3 'font-lock-regexp-grouping-construct prepend))
|
(3 'font-lock-regexp-grouping-construct prepend))
|
||||||
(lisp--match-hidden-arg
|
(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")
|
help-echo "Easy to misread; consider moving the element to the next line")
|
||||||
prepend))
|
prepend))
|
||||||
(lisp--match-confusable-symbol-character
|
(lisp--match-confusable-symbol-character
|
||||||
0 '(face 'font-lock-warning-face
|
0 '(face font-lock-warning-face
|
||||||
help-echo "Confusable character"))
|
help-echo "Confusable character"))
|
||||||
))
|
))
|
||||||
"Gaudy level highlighting for Emacs Lisp mode.")
|
"Gaudy level highlighting for Emacs Lisp mode.")
|
||||||
|
|
@ -547,29 +547,29 @@ This will generate compile-time constants from BINDINGS."
|
||||||
(append
|
(append
|
||||||
lisp-cl-font-lock-keywords-1
|
lisp-cl-font-lock-keywords-1
|
||||||
`( ;; Regexp negated char group.
|
`( ;; Regexp negated char group.
|
||||||
("\\[\\(\\^\\)" 1 'font-lock-negation-char-face prepend)
|
("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)
|
||||||
;; Control structures. Common Lisp forms.
|
;; Control structures. Common Lisp forms.
|
||||||
(,(concat "(" cl-kws-re "\\_>") . 1)
|
(,(concat "(" cl-kws-re "\\_>") . 1)
|
||||||
;; Exit/Feature symbols as constants.
|
;; Exit/Feature symbols as constants.
|
||||||
(,(concat "(\\(catch\\|throw\\|provide\\|require\\)\\_>"
|
(,(concat "(\\(catch\\|throw\\|provide\\|require\\)\\_>"
|
||||||
"[ \t']*\\(" (rx lisp-mode-symbol) "\\)?")
|
"[ \t']*\\(" (rx lisp-mode-symbol) "\\)?")
|
||||||
(1 'font-lock-keyword-face)
|
(1 font-lock-keyword-face)
|
||||||
(2 'font-lock-constant-face nil t))
|
(2 font-lock-constant-face nil t))
|
||||||
;; Erroneous structures.
|
;; Erroneous structures.
|
||||||
(,(concat "(" cl-errs-re "\\_>")
|
(,(concat "(" cl-errs-re "\\_>")
|
||||||
(1 'font-lock-warning-face))
|
(1 font-lock-warning-face))
|
||||||
;; Words inside ‘’ and `' tend to be symbol names.
|
;; Words inside ‘’ and `' tend to be symbol names.
|
||||||
(,(concat "[`‘]\\(" (rx lisp-mode-symbol) "\\)['’]")
|
(,(concat "[`‘]\\(" (rx lisp-mode-symbol) "\\)['’]")
|
||||||
(1 'font-lock-constant-face prepend))
|
(1 font-lock-constant-face prepend))
|
||||||
;; Uninterned symbols, e.g., (defpackage #:my-package ...)
|
;; Uninterned symbols, e.g., (defpackage #:my-package ...)
|
||||||
;; must come before keywords below to have effect
|
;; 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.
|
;; Constant values.
|
||||||
(,(lambda (bound) (lisp-mode--search-key ":" bound))
|
(,(lambda (bound) (lisp-mode--search-key ":" bound))
|
||||||
(0 'font-lock-builtin-face))
|
(0 font-lock-builtin-face))
|
||||||
;; ELisp and CLisp `&' keywords as types.
|
;; ELisp and CLisp `&' keywords as types.
|
||||||
(,(lambda (bound) (lisp-mode--search-key "&" bound))
|
(,(lambda (bound) (lisp-mode--search-key "&" bound))
|
||||||
(0 'font-lock-type-face))
|
(0 font-lock-type-face))
|
||||||
;; ELisp regexp grouping constructs
|
;; ELisp regexp grouping constructs
|
||||||
;; This is too general -- rms.
|
;; This is too general -- rms.
|
||||||
;; A user complained that he has functions whose names start with `do'
|
;; A user complained that he has functions whose names start with `do'
|
||||||
|
|
@ -577,9 +577,9 @@ This will generate compile-time constants from BINDINGS."
|
||||||
;; That user has violated the https://www.cliki.net/Naming+conventions:
|
;; That user has violated the https://www.cliki.net/Naming+conventions:
|
||||||
;; CL (but not EL!) `with-' (context) and `do-' (iteration)
|
;; CL (but not EL!) `with-' (context) and `do-' (iteration)
|
||||||
(,(concat "(\\(\\(do-\\|with-\\)" (rx lisp-mode-symbol) "\\)")
|
(,(concat "(\\(\\(do-\\|with-\\)" (rx lisp-mode-symbol) "\\)")
|
||||||
(1 'font-lock-keyword-face))
|
(1 font-lock-keyword-face))
|
||||||
(lisp--match-hidden-arg
|
(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")
|
help-echo "Easy to misread; consider moving the element to the next line")
|
||||||
prepend))
|
prepend))
|
||||||
))
|
))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue