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: Gerd Möllmann
Subject: bug#57907: 29.0.50; Using keywords with cl-loop
Date: Sun, 18 Sep 2022 14:38:36 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

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?






reply via email to

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