GNU bug report logs - #71120
29.3; buglet in cl-loop

Previous Next

Package: emacs;

Reported by: Philippe Schnoebelen <phs <at> lmf.cnrs.fr>

Date: Wed, 22 May 2024 14:49:02 UTC

Severity: normal

Found in version 29.3

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#71120: closed (29.3; buglet in cl-loop)
Date: Sat, 01 Mar 2025 02:21:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 28 Feb 2025 18:20:08 -0800
with message-id <CADwFkmm2UyErUsbMZ=EAzWtRZHMzJ0DecAAhm+aEKdccBtAYDg <at> mail.gmail.com>
and subject line Re: bug#71120: 29.3; buglet in cl-loop
has caused the debbugs.gnu.org bug report #71120,
regarding 29.3; buglet in cl-loop
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
71120: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71120
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Philippe Schnoebelen <phs <at> lmf.cnrs.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.3; buglet in cl-loop
Date: Wed, 22 May 2024 10:43:36 +0200
When I need a list of 100 random dice throws I write

	(cl-loop for i from 1 to 100 collect (random 6))

It compiles just fine.

If instead I use

	(cl-loop for _i from 1 to 100 collect (random 6))

then I get a compilation warning:

	foo.el:1:18: Warning: variable ‘_i’ not left unused

It should be the other way around.

The variable 'i' is unused in the first form and that deserves a warning 
at compile time. Otherwise the compiler will not help me catch the typo in

	(cl-loop for i from 0 to 10 do
	   (cl-loop for j from 0 to 10 do
	      (foo j j))) ;; <<<=== typo, I meant (foo i j)


--ph.schnoebelen, happy and thankful GNU Emacs user since 1983 (Thanks 
to all involved!!)



[Message part 3 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: 71120-done <at> debbugs.gnu.org, Philip Kaludercic <philipk <at> posteo.net>,
 Andrea Corallo <acorallo <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Philippe Schnoebelen <phs <at> lmf.cnrs.fr>
Subject: Re: bug#71120: 29.3; buglet in cl-loop
Date: Fri, 28 Feb 2025 18:20:08 -0800
Mattias Engdegård <mattias.engdegard <at> gmail.com> writes:

> 3 juni 2024 kl. 17.24 skrev Andrea Corallo <acorallo <at> gnu.org>:
>
>> Okay so I guess we can keep this bug open as a reminder for this?
>
> Thank you, but there's no need for that as far as I'm concerned.

I'm therefore closing this bug report.


This bug report was last modified 80 days ago.

Previous Next


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