GNU bug report logs - #25154
25.1; Bindings in cl-letf are in reverse order

Previous Next

Package: emacs;

Reported by: Alex <agrambot <at> gmail.com>

Date: Fri, 9 Dec 2016 23:55:02 UTC

Severity: minor

Tags: notabug

Found in version 25.1

Done: Philipp Stephani <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alex <agrambot <at> gmail.com>
Subject: bug#25154: closed (Re: bug#25154: 25.1; Bindings in cl-letf are
 in reverse order)
Date: Fri, 23 Dec 2016 16:32:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#25154: 25.1; Bindings in cl-letf are in reverse order

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 25154 <at> debbugs.gnu.org.

-- 
25154: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25154
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, 25154-done <at> debbugs.gnu.org
Cc: agrambot <at> gmail.com, tino.calancha <at> gmail.com
Subject: Re: bug#25154: 25.1; Bindings in cl-letf are in reverse order
Date: Fri, 23 Dec 2016 16:30:47 +0000
[Message part 3 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> schrieb am Fr., 23. Dez. 2016 um 14:53 Uhr:

> > From: Philipp Stephani <p.stephani2 <at> gmail.com>
> > Date: Fri, 23 Dec 2016 12:17:54 +0000
> > Cc: tino.calancha <at> gmail.com, 25154 <at> debbugs.gnu.org, agrambot <at> gmail.com
> >
> >  I agree, patches to that effect are welcome. (AFAICT, the manual
> >  tries to say that already, but the wording could be more explicit.)
> >
> > OK, I've attached a patch that hopefully clarifies this a bit.
>
> Thanks.  My only comment is that I think we prefer talking about
> "binding" instead of "assignment".
>

OK, replaced "assign" with "bind" and pushed to emacs-25 as
c04ac8a3191820d37e7858b7ca4e31cf04808cc3.
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Alex <agrambot <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; Bindings in cl-letf are in reverse order
Date: Fri, 09 Dec 2016 17:36:15 -0600
Compare the following:

(let ((x 5)
      (x 6))
  (+ x 10))

=> 16

(cl-letf ((x 5)
          (x 6))
  (+ x 10))

=> 15


This also occurs when using non-trivial places:

(setq v (vector 1 2 3 4 5))

(cl-letf (((aref v 1) 10)
          ((aref v 1) 20))
  (aref v 1))

=> 10


I ran into this when using two different setters that sometimes
indirectly modify the same variable. The current behaviour makes the
result of that unexpected.




This bug report was last modified 8 years and 150 days ago.

Previous Next


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