[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Check if a symbol is bound to a macro
From: |
Nordlöw |
Subject: |
Check if a symbol is bound to a macro |
Date: |
Tue, 8 Dec 2009 12:43:01 -0800 (PST) |
User-agent: |
G2/1.0 |
Is there a way to query if a symbol is bound to a macro?
list-fns.el written by Noah Friedman provides the function
(defun macrop (x)
"Return `t' if X is a macro, `nil' otherwise.
X may be a raw or byte-compiled macro. No attempt is made to
determine if
the macro is actually well-formed (i.e. syntactically valid)."
(cond ((not (consp x))
nil)
((eq (car x) 'macro)
(functionp (cdr x)))))
but it doesn't work for me.
(macrop 'case)
returns nil.
Thanks,
Nordlöw
- Check if a symbol is bound to a macro,
Nordlöw <=