GNU bug report logs - #6583
23.2; cl loop macro with `and' clause

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Wed, 7 Jul 2010 23:34:03 UTC

Severity: normal

Tags: confirmed

Merged with 56416

Found in versions 23.2, 24.5, 25.0.94, 29.0.50

Full log


Message #16 received at control <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: 6583 <at> debbugs.gnu.org
Subject: Re: 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




This bug report was last modified 3 years and 75 days ago.

Previous Next


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