In SBCL 0.8.16-1 from Debian:
* (documentation #'(lambda () "hello" t) 'function)
I suppose this behavior conforms to the spec, as implementations
are allowed to discard documentation strings at any time. But
I'd still prefer to get "hello" from there.
* (defmacro foo () "hello" t)
* (documentation (macro-function 'foo) 'function)
* (documentation 'foo 'function)
The specification of DEFMACRO says: "Documentation is attached as
a documentation string to name (as kind function) and to the
macro function." Apparently those are two separate slots and
SBCL conforms here, although I don't understand the rationale.
Still, please make SBCL not discard the documentation string of
the macro function defined by DEFMACRO.
* (macrolet ((local-macro-documentation (macro-name &environment env)
"Expand to the docstring of the local macro MACRO-NAME."
(documentation (macro-function macro-name env) 'function)))
The specification of MACROLET says: "Any local-documentation is
attached to the corresponding local macro function as a
documentation string." Please make SBCL not discard this string.
Get latest updates about Open Source Projects, Conferences and News.