diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el index 0a6a86c304e..ba756ced09d 100644 --- a/lisp/emacs-lisp/elisp-scope.el +++ b/lisp/emacs-lisp/elisp-scope.el @@ -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-1 face '(symbol . defface)) - ;; TODO: Use `elisp-scope-1' with an appropriate outspec. - (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 spec '(repeat . (cons t . (plist (:inherit . (symbol . face)))))) (elisp-scope-1 doc) (while-let ((kw (car-safe args)) (bkw (elisp-scope--sym-bare kw)) diff --git a/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el b/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el index f13398412d3..3cefc5824fe 100644 --- a/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el +++ b/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el @@ -161,3 +161,13 @@ ;; ^ (elisp-shorthand-font-lock-face 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)