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

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

bug#40727: 27.0.91; 'cl-loop ... across ... and' seems broken


From: Noam Postavsky
Subject: bug#40727: 27.0.91; 'cl-loop ... across ... and' seems broken
Date: Thu, 30 Apr 2020 08:30:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)

tags 40727 + confirmed
quit

Philipp Stephani <p.stephani2@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

Attachment: 0001-Revert-cl-loop-Calculate-the-array-length-just-once.patch
Description: patch

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.


reply via email to

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