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


Message #11 received at 12119 <at> debbugs.gnu.org (full text, mbox):

From: Helmut Eller <eller.helmut <at> gmail.com>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 12119 <at> debbugs.gnu.org
Subject: Re: bug#12119: 24.1.50; symbol-macrolet regresssion
Date: Sun, 05 Aug 2012 13:38:45 +0200
On Sun, Aug 05 2012, Stefan Monnier wrote:

>> 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.

Well, it depends on the definition of "correct".  The old version seems
to do what the documentation says, i.e., let binding the variable is
treated like letf.  What you call "correct" may be closer to what ANSI
CL does, but such a change should be documented.

Either way, I don't see the point in breaking existing code.

Helmut




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.