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: Noam Postavsky
Subject: bug#6583: 23.2; cl loop macro with `and' clause
Date: Thu, 2 Jun 2016 18:06:58 -0400

tag 6583 + confirmed
found 6583 24.5
found 6583 25.0.94
quit

Thierry Volpiatto <thierry.volpiatto <at> gmail.com> wrote:
> IMHO this is not correct, 'and' clauses should be used after conditionals
> (e.g if, when etc..)

No, it should also work for 'for' clauses, as documented in CL Hyperspec [1]

    for-as-clause::= {for | as} for-as-subclause {and for-as-subclause}*

and Emacs' CL manual [2]

    If you include several ‘for’ clauses in a row, they are treated
    sequentially (as if by ‘let*’ and ‘setq’).  You can instead use the
    word ‘and’ to link the clauses, in which case they are processed in
    parallel (as if by ‘let’ and ‘cl-psetq’).

The SBCL example is just missing the 'do', that's why it failed.


[1]: http://www.lispworks.com/documentation/lw51/CLHS/Body/m_loop.htm
[2]: http://www.gnu.org/software/emacs/manual/html_node/cl/For-Clauses.html





reply via email to

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