GNU bug report logs - #60974
30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies

Previous Next

Package: emacs;

Reported by: Vibhav Pant <vibhavp <at> gmail.com>

Date: Fri, 20 Jan 2023 21:25:01 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Vibhav Pant <vibhavp <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Mattias Engdegård <mattiase <at> acm.org>, 60974 <60974 <at> debbugs.gnu.org>
Subject: bug#60974: 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies
Date: Tue, 07 Feb 2023 18:32:46 +0530
[Message part 1 (text/plain, inline)]
On Thu, 2023-02-02 at 11:04 -0500, Stefan Monnier wrote:
> > Alternatively, we could define a macro, store its expanded form in
> > a
> > variable and run it through `cconv-closure-convert`, checking
> > afterwards whether the original value changed or not. It feels a
> > little
> > more reliable, but writing it might be a little tricky.
> 
> I was thinking of doing something like:
> 
>     (let ((f '(lambda () (interactive ...) ...)))
>       (should (equal f
>                      (let ((fc (copy-tree f)))
>                        (byte-compile fc)
>                        fc))))
> 
> 
> -- Stefan
> 

I wrote a variant of this that specifically calls `cconv-closure-
convert`, and checks if the interactive spec has been modified, using
`eq`. It fails on master, and passes with the patch installed.

-- 
Vibhav Pant
vibhavp <at> gmail.com
GPG: 7ED1 D48C 513C A024 BE3A  785F E3FB 28CB 6AB5 9598
[60974-tests.diff (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.