[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25154: 25.1; Bindings in cl-letf are in reverse order
From: |
Alex |
Subject: |
bug#25154: 25.1; Bindings in cl-letf are in reverse order |
Date: |
Fri, 09 Dec 2016 22:29:36 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Alex <agrambot@gmail.com> writes:
> 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.
I attached a patch that fixes this issue:
0001-Preserve-the-order-of-bindings-in-cl-letf.patch
Description: cl-letf patch
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Alex, 2016/12/09
- bug#25154: 25.1; Bindings in cl-letf are in reverse order,
Alex <=
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Eli Zaretskii, 2016/12/10
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Tino Calancha, 2016/12/10
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Philipp Stephani, 2016/12/10
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Tino Calancha, 2016/12/10
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Eli Zaretskii, 2016/12/10
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Philipp Stephani, 2016/12/23
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Tino Calancha, 2016/12/23
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Eli Zaretskii, 2016/12/23
- bug#25154: 25.1; Bindings in cl-letf are in reverse order, Philipp Stephani, 2016/12/23
bug#25154: 25.1; Bindings in cl-letf are in reverse order, Alex, 2016/12/10