1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

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.
This commit is contained in:
Alan Mackenzie 2022-03-16 19:23:24 +00:00
parent 0e5f8e24af
commit 31a2428d6f

View file

@ -500,8 +500,9 @@ Return the compile-time value of FORM."
byte-compile-new-defuns)) byte-compile-new-defuns))
(setf result (setf result
(byte-compile-eval (byte-compile-eval
(byte-run-strip-symbol-positions
(byte-compile-top-level (byte-compile-top-level
(byte-compile-preprocess form))))))) (byte-compile-preprocess form))))))))
(list 'quote result)))) (list 'quote result))))
(eval-and-compile . ,(lambda (&rest body) (eval-and-compile . ,(lambda (&rest body)
(byte-compile-recurse-toplevel (byte-compile-recurse-toplevel
@ -512,9 +513,10 @@ Return the compile-time value of FORM."
;; or byte-compile-file-form. ;; or byte-compile-file-form.
(let* ((print-symbols-bare t) ; Possibly redundant binding. (let* ((print-symbols-bare t) ; Possibly redundant binding.
(expanded (expanded
(macroexpand--all-toplevel (byte-run-strip-symbol-positions
form (macroexpand--all-toplevel
macroexpand-all-environment))) form
macroexpand-all-environment))))
(eval expanded lexical-binding) (eval expanded lexical-binding)
expanded))))) expanded)))))
(with-suppressed-warnings (with-suppressed-warnings