Re: Any programmable way to ask whether a symbol has been proclaimed
by jcornez@[EMAIL PROTECTED]
May 16, 2008 at 06:57 AM
Something simpler ought to be possible. How about this?
(defun special-p (symbol)
(if (constantp symbol)
t ;; or change to nil if you think constants are not special...
(let ((value (if (boundp symbol) (symbol-value symbol) '#:unique))
(test `(lambda (,symbol)
(ignore-errors
(eq (symbol-value ',symbol) ,symbol)))))
(values (funcall (coerce test 'function) value)))))
Seems to work (with no warnings) on ACL8.1 and SBCL.
-Jason