unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25154: 25.1; Bindings in cl-letf are in reverse order
@ 2016-12-09 23:36 Alex
  2016-12-10  4:29 ` Alex
  2016-12-10  7:22 ` Eli Zaretskii
  0 siblings, 2 replies; 17+ messages in thread
From: Alex @ 2016-12-09 23:36 UTC (permalink / raw)
  To: 25154

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.






^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-12-23 16:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-09 23:36 bug#25154: 25.1; Bindings in cl-letf are in reverse order Alex
2016-12-10  4:29 ` Alex
2016-12-10  7:22 ` Eli Zaretskii
2016-12-10  7:43   ` Tino Calancha
2016-12-10 13:41     ` Philipp Stephani
2016-12-10 14:01       ` Tino Calancha
2016-12-10 14:09       ` Eli Zaretskii
2016-12-23 12:17         ` Philipp Stephani
2016-12-23 12:46           ` Tino Calancha
2016-12-23 13:53           ` Eli Zaretskii
2016-12-23 16:30             ` Philipp Stephani
2016-12-10 18:05   ` Alex
2016-12-10 18:14     ` npostavs
2016-12-10 19:41       ` Alex
2016-12-10 18:27     ` Eli Zaretskii
2016-12-10 19:52       ` Alex
2016-12-11  3:11         ` Tino Calancha

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