bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6583: 23.2; cl loop macro with `and' clause


From: Alex
Subject: bug#6583: 23.2; cl loop macro with `and' clause
Date: Sat, 24 Jun 2017 21:03:28 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

npostavs@users.sourceforge.net writes:

> Alex <agrambot@gmail.com> writes:

> I can't claim to fully understand the loop macro implementation, but
> your patch breaks this example from the manual `(cl) For Clauses':
>
>      (cl-loop for x below 5 for y = nil then x collect (list x y))
>              => ((0 nil) (1 1) (2 2) (3 3) (4 4))
>      (cl-loop for x below 5 and y = nil then x collect (list x y))
>              => ((0 nil) (1 0) (2 1) (3 2) (4 3))
>
> With your patch the second loop gives ((0 nil) (1 1) (2 2) (3 3) (4 4))
> like the first.

You're right, sorry. This breaks loops with variables that are updated
in loop-for-steps rather than loop-for-sets. When I started testing
other cases I was accidentally using the pre-patch branch to do so.

I can't think of an easy solution to cover both problems right now. If
no one better suited can figure this out, I'll come back to this after
completing an ert suite for cl-loop (of which I'm part-way through).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]