GNU bug report logs - #40727
27.0.91; 'cl-loop ... across ... and' seems broken

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Mon, 20 Apr 2020 00:34:02 UTC

Severity: normal

Tags: confirmed, fixed

Found in version 27.0.91

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 40727 <at> debbugs.gnu.org, Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#40727: 27.0.91; 'cl-loop ... across ... and' seems broken
Date: Thu, 30 Apr 2020 08:30:48 -0400
[Message part 1 (text/plain, inline)]
tags 40727 + confirmed
quit

Philipp Stephani <p.stephani2 <at> gmail.com> writes:

> In Emacs 26:
>
> emacs -Q -batch -l cl-lib -eval '(cl-loop for x across [1 2] and y across [3 4])'
>
> works (i.e. no error), but in Emacs 27 it gives an error
>
> Symbol’s value as variable is void: --cl-vec--
>
> This doesn't happen with "for" instead of "and", and also doesn't happen
> with lists and "in".

It's because of [1: bfca19e475].  I think it should be possible to fix
by grouping the bindings put into 'loop-for-bindings', but meanwhile we
should revert that change, at least on the release branch.  It doesn't
revert automatically because there was meanwhile another change to use
'cl--push-clause-loop-body' instead of 'push' on the involved lines, but
after manual fixup your example works correctly.

[1: bfca19e475]: 2018-01-08 00:33:15 +0900
  cl-loop: Calculate the array length just once
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bfca19e475c01f13dbacc7f8b7bb1aecf46cb7e4

[0001-Revert-cl-loop-Calculate-the-array-length-just-once.patch (text/plain, attachment)]
[Message part 3 (text/plain, inline)]
By the way, while adding the test case I found an additional regression
involving loop termination by a 'var = ...' clause.  I'll open another
bug about it soon.


This bug report was last modified 5 years and 72 days ago.

Previous Next


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