GNU bug report logs -
#57907
29.0.50; Using keywords with cl-loop
Previous Next
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
View this message in rfc822 format
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
> 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">
Interesting, I did not know this. But the point remains that Common
Lisp's loop accepts both the symbol "a" from the "COMMON-LISP" package
and from the "KEYWORD" package, right?
> while in Emacs
>
> (symbol-name :a) => ":a"
>
> Wouldn't it be nice if Emacs finally decided to have Common Lisp packages?
Yeah, if only we could convince Emacs to do that ;)
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.