Subject: bug#12119: 24.1.50; symbol-macrolet regresssion

From: Stefan Monnier <[email-masked]>
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