1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; elisp-scope.el: Simplify 'eval' analyzer.

This commit is contained in:
Eshel Yaron 2025-10-01 08:56:55 +02:00
parent 3cff47ec75
commit c2d01dda42
No known key found for this signature in database
GPG key ID: EF3EE9CA35D78618

View file

@ -1671,9 +1671,12 @@ trusted code macro expansion is always safe."
(elisp-scope-define-analyzer eval (f form &optional lexical)
(elisp-scope-report-s f 'function)
(if-let* ((quoted (elisp-scope--unquote form)))
(elisp-scope-1 quoted)
(elisp-scope-1 form))
;; TODO: Use elisp-scope-1 with outtype `code' in the next line.
;; Difficulty: that would analyze the quoted code as if it is
;; evaluated in an unrelated local environment, so local variables
;; wouldn't be recognized correctly etc. We can solve that by adding
;; some `code-evaled-here' outtype.
(elisp-scope-1 (or (elisp-scope--unquote form) form))
(elisp-scope-1 lexical))
(elisp-scope-define-function-analyzer funcall (&optional f &rest args)