bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#60974: [PATCH] 30.0.50; byte-compile-preprocess mutates self evaluat


From: Vibhav Pant
Subject: bug#60974: [PATCH] 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies
Date: Sat, 21 Jan 2023 03:06:34 +0530
User-agent: Evolution 3.46.3

The attached patch should fix this, thoughts?

Thanks,
Vibhav

-- 
Vibhav Pant
vibhavp@gmail.com
GPG: 7ED1 D48C 513C A024 BE3A  785F E3FB 28CB 6AB5 9598
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index aa9521e5a65..847965e6af6 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2581,7 +2581,8 @@ byte-compile-flush-pending
 
 (defun byte-compile-preprocess (form &optional _for-effect)
   (let ((print-symbols-bare t))         ; Possibly redundant binding.
-    (setq form (macroexpand-all form byte-compile-macro-environment)))
+    (setq form (copy-tree
+                (macroexpand-all form byte-compile-macro-environment))))
   ;; FIXME: We should run byte-optimize-form here, but it currently does not
   ;; recurse through all the code, so we'd have to fix this first.
   ;; Maybe a good fix would be to merge byte-optimize-form into

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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