emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 31a2428d6f: Strip positions from symbols before the eval in eval-


From: Alan Mackenzie
Subject: master 31a2428d6f: Strip positions from symbols before the eval in eval-{when, and}-compile.
Date: Wed, 16 Mar 2022 15:24:51 -0400 (EDT)

branch: master
commit 31a2428d6f2ca792af18b43ceca5cec1ecce862f
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>

    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.
---
 lisp/emacs-lisp/bytecomp.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 9be44a8d5a..c680437f32 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]