diff options
| author | Eshel Yaron | 2025-10-01 08:56:55 +0200 |
|---|---|---|
| committer | Eshel Yaron | 2025-10-01 08:56:55 +0200 |
| commit | c2d01dda422550f36ca196f27f200ffe7dfee499 (patch) | |
| tree | 02f2975dbde84f2f2e5076ce7598c4143c2e1d41 | |
| parent | 3cff47ec75a40fd7309e75bd42b9d598ad079be0 (diff) | |
| download | emacs-c2d01dda422550f36ca196f27f200ffe7dfee499.tar.gz emacs-c2d01dda422550f36ca196f27f200ffe7dfee499.zip | |
; elisp-scope.el: Simplify 'eval' analyzer.
| -rw-r--r-- | lisp/emacs-lisp/elisp-scope.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el index f91f052fbb1..1eb385dbddb 100644 --- a/lisp/emacs-lisp/elisp-scope.el +++ b/lisp/emacs-lisp/elisp-scope.el | |||
| @@ -1671,9 +1671,12 @@ trusted code macro expansion is always safe." | |||
| 1671 | 1671 | ||
| 1672 | (elisp-scope-define-analyzer eval (f form &optional lexical) | 1672 | (elisp-scope-define-analyzer eval (f form &optional lexical) |
| 1673 | (elisp-scope-report-s f 'function) | 1673 | (elisp-scope-report-s f 'function) |
| 1674 | (if-let* ((quoted (elisp-scope--unquote form))) | 1674 | ;; TODO: Use elisp-scope-1 with outtype `code' in the next line. |
| 1675 | (elisp-scope-1 quoted) | 1675 | ;; Difficulty: that would analyze the quoted code as if it is |
| 1676 | (elisp-scope-1 form)) | 1676 | ;; evaluated in an unrelated local environment, so local variables |
| 1677 | ;; wouldn't be recognized correctly etc. We can solve that by adding | ||
| 1678 | ;; some `code-evaled-here' outtype. | ||
| 1679 | (elisp-scope-1 (or (elisp-scope--unquote form) form)) | ||
| 1677 | (elisp-scope-1 lexical)) | 1680 | (elisp-scope-1 lexical)) |
| 1678 | 1681 | ||
| 1679 | (elisp-scope-define-function-analyzer funcall (&optional f &rest args) | 1682 | (elisp-scope-define-function-analyzer funcall (&optional f &rest args) |