]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/scope.el: Analyze type argument of cl-typep
authorEshel Yaron <me@eshelyaron.com>
Mon, 20 Jan 2025 07:57:16 +0000 (08:57 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 20 Jan 2025 07:57:16 +0000 (08:57 +0100)
lisp/emacs-lisp/scope.el

index f563159254c13e18eff56a958511d5bcb02c7da3..5ea596fbeaece11cbb6f04725ceffb3077ddee67 100644 (file)
@@ -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 \`)))