diff options
| author | Alan Mackenzie | 2022-03-16 19:23:24 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2022-03-16 19:23:24 +0000 |
| commit | 31a2428d6f2ca792af18b43ceca5cec1ecce862f (patch) | |
| tree | 56e49e6d41612dd4e58c2c0a67822a72bbcc88f2 | |
| parent | 0e5f8e24af525a1f9a441305b1c7d24c4fcf9cda (diff) | |
| download | emacs-31a2428d6f2ca792af18b43ceca5cec1ecce862f.tar.gz emacs-31a2428d6f2ca792af18b43ceca5cec1ecce862f.zip | |
Strip positions from symbols before the eval in eval-{when,and}-compile.
This fixes bug #54079.
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Change
the position of 'byte-run-strip-symbol-positions' in the eval-when-compile
entry. Add a call to `byte-run-strip-symbol-positions' in the
eval-and-compile entry.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 9be44a8d5af..c680437f324 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -500,8 +500,9 @@ Return the compile-time value of FORM." | |||
| 500 | byte-compile-new-defuns)) | 500 | byte-compile-new-defuns)) |
| 501 | (setf result | 501 | (setf result |
| 502 | (byte-compile-eval | 502 | (byte-compile-eval |
| 503 | (byte-run-strip-symbol-positions | ||
| 503 | (byte-compile-top-level | 504 | (byte-compile-top-level |
| 504 | (byte-compile-preprocess form))))))) | 505 | (byte-compile-preprocess form)))))))) |
| 505 | (list 'quote result)))) | 506 | (list 'quote result)))) |
| 506 | (eval-and-compile . ,(lambda (&rest body) | 507 | (eval-and-compile . ,(lambda (&rest body) |
| 507 | (byte-compile-recurse-toplevel | 508 | (byte-compile-recurse-toplevel |
| @@ -512,9 +513,10 @@ Return the compile-time value of FORM." | |||
| 512 | ;; or byte-compile-file-form. | 513 | ;; or byte-compile-file-form. |
| 513 | (let* ((print-symbols-bare t) ; Possibly redundant binding. | 514 | (let* ((print-symbols-bare t) ; Possibly redundant binding. |
| 514 | (expanded | 515 | (expanded |
| 515 | (macroexpand--all-toplevel | 516 | (byte-run-strip-symbol-positions |
| 516 | form | 517 | (macroexpand--all-toplevel |
| 517 | macroexpand-all-environment))) | 518 | form |
| 519 | macroexpand-all-environment)))) | ||
| 518 | (eval expanded lexical-binding) | 520 | (eval expanded lexical-binding) |
| 519 | expanded))))) | 521 | expanded))))) |
| 520 | (with-suppressed-warnings | 522 | (with-suppressed-warnings |