]> git.eshelyaron.com Git - emacs.git/commitdiff
Strip positions from symbols before the eval in eval-{when,and}-compile.
authorAlan Mackenzie <acm@muc.de>
Wed, 16 Mar 2022 19:23:24 +0000 (19:23 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 16 Mar 2022 19:23:24 +0000 (19:23 +0000)
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.

lisp/emacs-lisp/bytecomp.el

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