aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEshel Yaron2025-10-02 15:22:51 +0200
committerEshel Yaron2025-10-02 15:22:51 +0200
commitceeeb390f01f0c2fe1e2502a8ad42fa2acdd8e9c (patch)
tree8ed7e63a73b9045c6be6413d23269f4a43899344
parentcfc58025cd4502c5cca5d00b1d69adde9fe28b53 (diff)
downloademacs-ceeeb390f01f0c2fe1e2502a8ad42fa2acdd8e9c.tar.gz
emacs-ceeeb390f01f0c2fe1e2502a8ad42fa2acdd8e9c.zip
; (elisp-scope-1): Analyze macros with (debug t) as progn
Take an Edebug spec of t as an indication that all of the macro's arguments are evaluated, and analyze them as such. Only do so as a fallback for macros that we cannot expand, because expanding can lead to more accurate analysis, e.g. with regards to the output type of the form.
-rw-r--r--lisp/emacs-lisp/elisp-scope.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el
index 3e49bad721f..00562c4a859 100644
--- a/lisp/emacs-lisp/elisp-scope.el
+++ b/lisp/emacs-lisp/elisp-scope.el
@@ -2736,7 +2736,6 @@ are analyzed."
2736 ((special-form-p bare) (elisp-scope-report-s f 'special-form) (elisp-scope-n forms)) 2736 ((special-form-p bare) (elisp-scope-report-s f 'special-form) (elisp-scope-n forms))
2737 ((macrop bare) (elisp-scope-report-s f 'macro) 2737 ((macrop bare) (elisp-scope-report-s f 'macro)
2738 (cond 2738 (cond
2739 ;; ((eq (get bare 'edebug-form-spec) t) (elisp-scope-n forms))
2740 ((elisp-scope-safe-macro-p bare) 2739 ((elisp-scope-safe-macro-p bare)
2741 (let* ((warning-minimum-log-level :emergency) 2740 (let* ((warning-minimum-log-level :emergency)
2742 (macroexp-inhibit-compiler-macros t) 2741 (macroexp-inhibit-compiler-macros t)
@@ -2746,7 +2745,8 @@ are analyzed."
2746 (macroexpand-all-environment 2745 (macroexpand-all-environment
2747 (append (mapcar #'list elisp-scope-unsafe-macros) macroexpand-all-environment)) 2746 (append (mapcar #'list elisp-scope-unsafe-macros) macroexpand-all-environment))
2748 (expanded (ignore-errors (macroexpand-1 form macroexpand-all-environment)))) 2747 (expanded (ignore-errors (macroexpand-1 form macroexpand-all-environment))))
2749 (elisp-scope-1 expanded outtype))))) 2748 (elisp-scope-1 expanded outtype)))
2749 ((eq (get bare 'edebug-form-spec) t) (elisp-scope-n forms))))
2750 ((or (functionp bare) (memq bare elisp-scope-local-functions)) 2750 ((or (functionp bare) (memq bare elisp-scope-local-functions))
2751 (elisp-scope-report-s f 'function) (elisp-scope-n forms)) 2751 (elisp-scope-report-s f 'function) (elisp-scope-n forms))
2752 (t 2752 (t