unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 12119@debbugs.gnu.org
Subject: bug#12119: 24.1.50; symbol-macrolet regresssion
Date: Sun, 05 Aug 2012 13:38:45 +0200	[thread overview]
Message-ID: <m2wr1do9fe.fsf@gmail.com> (raw)
In-Reply-To: <jwv7gtexm9r.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 04 Aug 2012 19:40:46 -0400")

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





  reply	other threads:[~2012-08-05 11:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02 13:13 bug#12119: 24.1.50; symbol-macrolet regresssion Helmut Eller
2012-08-04 23:40 ` Stefan Monnier
2012-08-05 11:38   ` Helmut Eller [this message]
2012-08-06 16:20     ` Stefan Monnier
2012-08-06 19:54     ` Stefan Monnier

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=m2wr1do9fe.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=12119@debbugs.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).