From 5d96f55aad12f795f2edb934bfcc2716b01936e3 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 25 Jun 2025 17:45:05 +0200 Subject: [PATCH] scope.el: Handle 'autoload' --- lisp/emacs-lisp/scope.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/emacs-lisp/scope.el b/lisp/emacs-lisp/scope.el index 980b45d0b9f..b2facc3b8dd 100644 --- a/lisp/emacs-lisp/scope.el +++ b/lisp/emacs-lisp/scope.el @@ -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) -- 2.39.5