From 9cb6b27d1b4932cfd1fea8dd8cd92890c5d044c1 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Mon, 20 Jan 2025 08:57:16 +0100 Subject: [PATCH] * lisp/emacs-lisp/scope.el: Analyze type argument of cl-typep --- lisp/emacs-lisp/scope.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/emacs-lisp/scope.el b/lisp/emacs-lisp/scope.el index f563159254c..5ea596fbeae 100644 --- a/lisp/emacs-lisp/scope.el +++ b/lisp/emacs-lisp/scope.el @@ -798,6 +798,14 @@ a (possibly empty) list of safe macros.") (symbols-with-pos-enabled t)) (when-let ((val-form (plist-get props :group))) (scope-quoted-group local val-form)))) + (cl-typep + (when-let* ((alias-form (cadr forms)) + ((eq (scope-sym-bare (car-safe alias-form)) 'quote)) + (alias (cadr alias-form)) + (beg (scope-sym-pos alias)) + (bare (scope-sym-bare alias))) + (unless (booleanp bare) + (funcall scope-callback 'type beg (length (symbol-name bare)) nil)))) (throw (when-let* ((tag-form (car forms)) ((memq (scope-sym-bare (car-safe tag-form)) '(quote \`))) -- 2.39.5