mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
; elisp-scope.el: Improve face specification handling.
Replace the use of 'elisp-scope-face(-1)' for analyzing face specifications with 'elisp-scope-1' calls with an appropriate OUTSPEC argument. This allows us to analyze face specifications even when they are not passed directly to relevant functions, but rather appear in a tail position of a form that evaluates to a face specification. * lisp/emacs-lisp/elisp-scope.el (elisp-scope--match-spec-to-arg): Add new 'face' spec. Use it instead of... (elisp-scope-face, elisp-scope-face-1): ...these functions. Remove them, no longer used. * test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el: Add test.
This commit is contained in:
parent
b9aa420bc4
commit
330aa07f00
2 changed files with 42 additions and 52 deletions
|
|
@ -171,3 +171,14 @@
|
|||
"Face for highlighting symbol role names in Emacs Lisp code."
|
||||
:version "31.1")
|
||||
;; ^ (elisp-constant font-lock-builtin-face)
|
||||
|
||||
(propertize foo
|
||||
'face
|
||||
(cond
|
||||
((random) '(success (:foreground "green" :inherit default)))
|
||||
;; ^ elisp-face
|
||||
;; ^ elisp-face
|
||||
((foobar) 'font-lock-keyword-face)
|
||||
;; ^ elisp-face
|
||||
(t '(:inherit error))))
|
||||
;; ^ elisp-face
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue