GNU bug report logs - #57907
29.0.50; Using keywords with cl-loop

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Sun, 18 Sep 2022 12:05:01 UTC

Severity: normal

Found in version 29.0.50

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


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

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: philipk <at> posteo.net
Cc: 57907 <at> debbugs.gnu.org
Subject: Re: bug#57907: 29.0.50; Using keywords with cl-loop
Date: Sun, 18 Sep 2022 14:38:36 +0200
From: Philip Kaludercic @ 2022-09-18 12:03 UTC (permalink / raw)
  To: 57907


> In Common Lisp the following to are equivalent
>
>    (loop :repeat 5 :collect t)
>
> and
>
>    (loop repeat 5 collect t)
>
> as keywords are shared among all packages.

Actually, that's not the reason why Common Lisp accepts that.  The 
reason is that the loop macro only looks at symbol names.  In Common Lisp

(symbol-name :a) => "A"
(symbol-package :a) => #<PACKAGE "KEYWORD">
(symbol-name foo:a) => "A"
(symbol-package foo:a) => #<PACKAGE "FOO">

while in Emacs

(symbol-name :a) => ":a"

Wouldn't it be nice if Emacs finally decided to have Common Lisp packages?





This bug report was last modified 2 years and 246 days ago.

Previous Next


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