diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el index d90698ae4e3..4a2f1883986 100644 --- a/lisp/emacs-lisp/elisp-scope.el +++ b/lisp/emacs-lisp/elisp-scope.el @@ -2685,8 +2685,7 @@ ARGS bound to the analyzed arguments." (let ((symbols-with-pos-enabled t)) (and (member arg (cdr spec)) t))) (cl-defmethod elisp-scope--match-spec-to-arg ((spec (head plist)) arg) - (cond - ((consp arg) + (when (listp arg) (let ((res nil) (go t)) (while (and arg go) (let* ((key (car arg)) @@ -2695,17 +2694,14 @@ ARGS bound to the analyzed arguments." (push (if (keywordp bkw) '(symbol . constant) t) res) (push (setq go (elisp-scope--match-spec-to-arg (alist-get bkw (cdr spec) t) val)) res)) (setq arg (cddr arg))) - (when go (cons 'list (nreverse res))))) - ((null arg) t))) + (when go (cons 'list (nreverse res)))))) (cl-defmethod elisp-scope--match-spec-to-arg ((spec (head list)) arg) - (cond - ((consp arg) + (when (listp arg) (let ((specs (cdr spec)) (go t) res) (while (and specs (setq go (elisp-scope--match-spec-to-arg (pop specs) (pop arg)))) (push go res)) - (when go (cons 'list (nreverse res))))) - ((null arg) t))) + (when go (cons 'list (nreverse res)))))) (cl-defmethod elisp-scope--match-spec-to-arg ((spec (head plist-and-then)) arg) (cond diff --git a/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el b/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el index f4f64bae045..f13398412d3 100644 --- a/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el +++ b/test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el @@ -150,6 +150,13 @@ ))) :version "29.1") +;; Taken from browse-url.el: +(defcustom baz-opt 'browse-url-mail + "Baz." + :type '(function-item :tag "Emacs Mail" :value browse-url-mail)) +;; ^ elisp-widget-type +;; ^ (elisp-constant font-lock-builtin-face) + (e-s-analyze-form #'ignore) ;; ^ (elisp-shorthand-font-lock-face elisp-function) ;; ^ elisp-function