GNU bug report logs - #12119
24.1.50; symbol-macrolet regresssion

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Thu, 2 Aug 2012 13:21:01 UTC

Severity: normal

Found in version 24.1.50

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 12119 <at> debbugs.gnu.org
Subject: bug#12119: 24.1.50; symbol-macrolet regresssion
Date: Sat, 04 Aug 2012 19:40:46 -0400
> Also, in Emacs 22 the macroepansion (via cl-macroexpand-all) 
> produces something like

> (let ((outer '42))
>   (let ((outer 'inner))
>     (progn
>       (or
>        (eq outer 'inner)
>        (signal 'cl-assertion-failed
>                (list
>                 '(eq x 'inner))))
>       nil)))

While the above expansion returns the right value, it is not correct.
The right expansion would be

   (let ((outer '42))
     (let ((x 'inner))
       (progn
         (or
          (eq x 'inner)
          (signal 'cl-assertion-failed
                  (list
                   '(eq x 'inner))))
         nil)))

> while in Emacs 24 it looks like 

> (let ((outer '42))
>   (progn
>     (let ((x 'inner))
>       (progn
> 	(or
> 	 (eq outer 'inner)
> 	 (signal 'cl-assertion-failed
> 		 (list
> 		  '(eq x 'inner))))
> 	nil))))

> Such a change should be documented.

That's an accident, so it shouldn't be documented.  The new code is no
better than the old one, and arguably slightly worse since it fails in
your test while the old code worked.
I'm not yet sure how we can fix it properly, tho.


        Stefan




This bug report was last modified 12 years and 292 days ago.

Previous Next


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