all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* keywordp & :killing-the-cat
@ 2009-09-05 20:37 MON KEY
  2009-09-05 21:14 ` Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: MON KEY @ 2009-09-05 20:37 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-05 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-05 20:37 keywordp & :killing-the-cat MON KEY
2009-09-05 21:14 ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.