GNU bug report logs - #48219
27.1.90; CL-LOOP facility fails with hash tables

Previous Next

Package: emacs;

Reported by: Juan José García Ripoll <juanjose.garcia.ripoll <at> csic.es>

Date: Tue, 4 May 2021 08:56:02 UTC

Severity: normal

Found in version 27.1.90

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Juan José García Ripoll <juanjose.garcia.ripoll <at> csic.es>, 48219 <at> debbugs.gnu.org
Subject: bug#48219: 27.1.90; CL-LOOP facility fails with hash tables
Date: Sat, 02 Jul 2022 13:24:36 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Yes, that does seem wrong.
>
> Agreed, but I don't know what the code is supposed to do when `database`
> is not-nil, so I can't even tell if the code is meaningful.

(cl-loop
 for database in nil
 for aux = (message "databse: %S" database)
 for entry being the hash-values of database
 do (message "FOO %S" database))

Hm...  Oh, yeah -- that's not really a meaningful loop statement, is it?
But by analogue, this equally pointless loop returns nil:

(cl-loop
 for database in '((1) (2))
 for entry in database
 collect entry)

So I guess the original loop should also do that.

But since it's a meaningless loop, perhaps erroring out in the hash
table case is fine, too?

>> I had a brief look at cl--parse-loop-clause, but this is code
>> I haven't looked at before, and I'm not sure I understand the control
>> flow here.  Adding Stefan to the CCs; I'm sure he can tell what should
>> be done immediately.  😀
>
> Well, it's fairly obvious: we should just fix the problem.
> Next!

Whew!  That was simple!

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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