1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-08 23:40:24 -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-define-analyzer eval (f form &optional lexical)
(elisp-scope-report-s f 'function) (elisp-scope-report-s f 'function)
(if-let* ((quoted (elisp-scope--unquote form))) ;; TODO: Use elisp-scope-1 with outtype `code' in the next line.
(elisp-scope-1 quoted) ;; Difficulty: that would analyze the quoted code as if it is
(elisp-scope-1 form)) ;; 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-1 lexical))
(elisp-scope-define-function-analyzer funcall (&optional f &rest args) (elisp-scope-define-function-analyzer funcall (&optional f &rest args)