1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 02:31:03 -08:00

; elisp-scope.el: Simplify 'custom-declare-face' analyzer.

This commit is contained in:
Eshel Yaron 2025-10-29 16:32:14 +01:00
parent 8c7b4391a5
commit b9aa420bc4
No known key found for this signature in database
GPG key ID: EF3EE9CA35D78618
2 changed files with 11 additions and 4 deletions

View file

@ -1835,10 +1835,7 @@ ARGS bound to the analyzed arguments."
(elisp-scope-define-function-analyzer custom-declare-face (face spec doc &rest args) (elisp-scope-define-function-analyzer custom-declare-face (face spec doc &rest args)
(elisp-scope-1 face '(symbol . defface)) (elisp-scope-1 face '(symbol . defface))
;; TODO: Use `elisp-scope-1' with an appropriate outspec. (elisp-scope-1 spec '(repeat . (cons t . (plist (:inherit . (symbol . face))))))
(if-let* ((q (elisp-scope--unquote spec)))
(when (consp q) (dolist (s q) (elisp-scope-face (cdr s))))
(elisp-scope-1 spec))
(elisp-scope-1 doc) (elisp-scope-1 doc)
(while-let ((kw (car-safe args)) (while-let ((kw (car-safe args))
(bkw (elisp-scope--sym-bare kw)) (bkw (elisp-scope--sym-bare kw))

View file

@ -161,3 +161,13 @@
;; ^ (elisp-shorthand-font-lock-face elisp-function) ;; ^ (elisp-shorthand-font-lock-face elisp-function)
;; ^ elisp-function ;; ^ elisp-function
;; ^ elisp-function ;; ^ elisp-function
(defface foobar
'((default :inherit font-lock-function-call-face)
;; ^ (elisp-constant font-lock-builtin-face)
;; ^ elisp-face
(((background light)) :foreground "#00008b")
(((background dark)) :foreground "#5c9cff"))
"Face for highlighting symbol role names in Emacs Lisp code."
:version "31.1")
;; ^ (elisp-constant font-lock-builtin-face)