emacs-devel
[Top][All Lists]
Advanced

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

keywordp & :killing-the-cat


From: MON KEY
Subject: keywordp & :killing-the-cat
Date: Sat, 5 Sep 2009 16:37:22 -0400

How does one test whether a symbol is a keyword?

(keywordp :killing-the-cat-with-epr) ;=> t
(unintern :killing-the-cat-with-epr) ;=> t

(mapatoms (lambda (x)
            (when (eq x :killing-the-cat-with-epr)
                (prin1 `(found ,x))))
                  obarray)

;=>(found :killing-the-cat-with-epr)

Is this because keywords are self quoting?
And if so, how does one use keywordp to test if a (possibly
non-existent) keyword is interned without interning it?

i.e. (makunbound :killing-the-cat-with-epr) ;-> Lisp error:
(setting-constant :killing-the-cat-with-epr)

s_P




reply via email to

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