From: Vibhav Pant <vibhavp@gmail.com>
To: 60974@debbugs.gnu.org, monnier@iro.umontreal.ca
Cc: emacs-devel <emacs-devel@gnu.org>
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 [thread overview]
Message-ID: <bdbc43eda9150848fc289d4afddb010cd567655f.camel__18553.2228717179$1674250647$gmane$org@gmail.com> (raw)
In-Reply-To: <b979003119097f23f6b13d5bc4f561596cdb9704.camel@gmail.com>
[-- 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 --]
prev parent reply other threads:[~2023-01-20 21:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-20 21:24 bug#60974: 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies Vibhav Pant
2023-01-20 21:35 ` Vibhav Pant
2023-01-21 5:43 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-27 12:44 ` Vibhav Pant
2023-01-28 23:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-31 13:52 ` Vibhav Pant
2023-01-31 14:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-01 7:41 ` Vibhav Pant
[not found] ` <22ab766cb75ceedac14976e02aebe02711ef6aad.camel@gmail.com>
2023-02-01 14:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-02 12:35 ` Vibhav Pant
[not found] ` <51cc5308368f09c02a315970275bd3968008c421.camel@gmail.com>
2023-02-02 12:39 ` Mattias Engdegård
2023-02-02 13:15 ` Vibhav Pant
2023-02-02 16:04 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-07 13:02 ` Vibhav Pant
2023-02-02 14:26 ` Eli Zaretskii
2023-01-20 21:36 ` Vibhav Pant [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='bdbc43eda9150848fc289d4afddb010cd567655f.camel__18553.2228717179$1674250647$gmane$org@gmail.com' \
--to=vibhavp@gmail.com \
--cc=60974@debbugs.gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).