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

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

bug#57907: 29.0.50; Using keywords with cl-loop


From: Philip Kaludercic
Subject: bug#57907: 29.0.50; Using keywords with cl-loop
Date: Sun, 18 Sep 2022 12:52:14 +0000

Gerd Möllmann <gerd.moellmann@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 ;)





reply via email to

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