]> git.eshelyaron.com Git - emacs.git/commitdiff
scope.el: Handle 'autoload'
authorEshel Yaron <me@eshelyaron.com>
Wed, 25 Jun 2025 15:45:05 +0000 (17:45 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 25 Jun 2025 15:45:05 +0000 (17:45 +0200)
lisp/emacs-lisp/scope.el

index 980b45d0b9fc9d6b68202c1f943d44689513b618..b2facc3b8dd4d461c6f04c2be1237ac78ba7b0c3 100644 (file)
@@ -1869,6 +1869,11 @@ a (possibly empty) list of safe macros.")
 (scope-define-function-analyzer setopt--set (&optional var _val)
   (when-let ((q (scope--unqoute var))) (scope-report-s q 'variable)))
 
+(scope-define-function-analyzer autoload (&optional func _file _doc int &rest _)
+  (when-let ((q (scope--unqoute func))) (scope-report-s q 'function))
+  (when-let ((q (scope--unqoute int)) ((listp q)))
+    (dolist (mode q) (scope-report-s mode 'major-mode))))
+
 (scope-define-macro-analyzer define-globalized-minor-mode (l global mode turn-on &rest body)
   (scope-report-s mode 'function)
   (scope-report-s turn-on 'function)