unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [PATCH] 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies
@ 2023-01-20 21:36 Vibhav Pant
  2023-01-21  4:12 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Vibhav Pant @ 2023-01-20 21:36 UTC (permalink / raw)
  To: 60974, monnier; +Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 162 bytes --]

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

[-- Attachment #1.2: Type: text/x-patch, Size: 744 bytes --]

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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies
  2023-01-20 21:36 [PATCH] 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies Vibhav Pant
@ 2023-01-21  4:12 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-01-21  4:12 UTC (permalink / raw)
  To: Vibhav Pant; +Cc: monnier, emacs-devel

> From: Vibhav Pant <vibhavp@gmail.com>
> Cc: emacs-devel <emacs-devel@gnu.org>
> Date: Sat, 21 Jan 2023 03:06:34 +0530
> 
> The attached patch should fix this, thoughts?

Please don't cross-post to emacs-devel and the bug tracker.  Please
send patches and bug reports only to the bug tracker.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-21  4:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20 21:36 [PATCH] 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies Vibhav Pant
2023-01-21  4:12 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).