documentation, (setf documentation)
documentation x doc-type → documentation
(setf documentation) new-value x doc-type → new-value
doc-type, object
I fixed a bunch of font-o's and formatting inconsistencies, and reordered all the methods into something a little less confusing. --sjl 7 Mar 92
Signature for STANDARD-SLOT-DESCRIPTION removed.
Functions, Macros, and Special Forms:
documentation (x function) (doc-type (eql 't))
documentation (x function) (doc-type (eql 'function))
documentation (x list) (doc-type (eql 'function))
documentation (x list) (doc-type (eql 'compiler-macro))
documentation (x symbol) (doc-type (eql 'function))
documentation (x symbol) (doc-type (eql 'compiler-macro))
documentation (x symbol) (doc-type (eql 'setf))
(setf documentation) new-value (x function) (doc-type (eql 't))
(setf documentation) new-value (x function) (doc-type (eql 'function))
(setf documentation) new-value (x list) (doc-type (eql 'function))
(setf documentation) new-value (x list) (doc-type (eql 'compiler-macro))
(setf documentation) new-value (x symbol) (doc-type (eql 'function))
(setf documentation) new-value (x symbol) (doc-type (eql 'compiler-macro))
(setf documentation) new-value (x symbol) (doc-type (eql 'setf))
Method Combinations:
documentation (x method-combination) (doc-type (eql 't))
documentation (x method-combination) (doc-type (eql 'method-combination))
documentation (x symbol) (doc-type (eql 'method-combination))
(setf documentation) new-value (x method-combination) (doc-type (eql 't))
(setf documentation) new-value (x method-combination) (doc-type (eql 'method-combination))
(setf documentation) new-value (x symbol) (doc-type (eql 'method-combination))
Methods:
documentation (x standard-method) (doc-type (eql 't))
(setf documentation) new-value (x standard-method) (doc-type (eql 't))
Packages:
documentation (x package) (doc-type (eql 't))
(setf documentation) new-value (x package) (doc-type (eql 't))
Types, Classes, and Structure Names:
documentation (x standard-class) (doc-type (eql 't))
documentation (x standard-class) (doc-type (eql 'type))
documentation (x structure-class) (doc-type (eql 't))
documentation (x structure-class) (doc-type (eql 'type))
documentation (x symbol) (doc-type (eql 'type))
documentation (x symbol) (doc-type (eql 'structure))
(setf documentation) new-value (x standard-class) (doc-type (eql 't))
(setf documentation) new-value (x standard-class) (doc-type (eql 'type))
(setf documentation) new-value (x structure-class) (doc-type (eql 't))
(setf documentation) new-value (x structure-class) (doc-type (eql 'type))
(setf documentation) new-value (x symbol) (doc-type (eql 'type))
(setf documentation) new-value (x symbol) (doc-type (eql 'structure))
Variables:
documentation (x symbol) (doc-type (eql 'variable))
(setf documentation) new-value (x symbol) (doc-type (eql 'variable))
x—an object. Removed the detail here because it is implied by the signatures above. This leaves room more naturally for implementation-defined extension. -kmp 2-Sep-91 a \term{symbol}, a \term{list}, a \term{method}, a \term{class}, a \term{package}, a \term{function}, or a \term{method combination} \term{object}. or a slot-description \term{object}.
doc-type—a symbol. Per issue DOCUMENTATION-FUNCTION-TANGLED, this has been simplified. If \param{x} is a \term{symbol} or a \term{list}, \param{doc-type} must be one of \issue{DOCUMENTATION-FUNCTION-BUGS:FIX} \misc{compiler-macro}, \endissue{DOCUMENTATION-FUNCTION-BUGS:FIX} \misc{function}, \misc{method-combination}, \misc{setf}, \misc{structure}, \misc{type}, or \misc{variable}; otherwise, \param{doc-type} must not be supplied.
documentation—a string, or nil.
new-value—a string.
The generic function documentation returns the documentation string associated with the given object if it is available; otherwise it returns nil.
The generic function (setf documentation) updates the documentation string associated with x to new-value. If x is a list, it must be of the form (setf symbol).
Documentation strings are made available for debugging purposes. Conforming programs are permitted to use documentation strings when they are present, but should not depend for their correct behavior on the presence of those documentation strings. An implementation is permitted to discard documentation strings at any time for implementation-defined reasons.
For those situations where a \param{doc-type} argument is permitted,The nature of the documentation string returned depends on the doc-type, as follows:
I alphabetized this list. --sjl 7 Mar 92
compiler-macro
Returns the documentation string of the compiler macro whose name is the function name x.
function
If x is a function name, returns the documentation string of the function, macro, or special operator whose name is x.
If x is a function, returns the documentation string associated with x.
method-combination
If x is a symbol, returns the documentation string of the method combination whose name is x.
If x is a method combination, returns the documentation string associated with x.
setf
Returns the documentation string of the setf expander whose name is the symbol x.
structure
!!! wording??Returns the documentation string associated with the structure name x.
t
added introductory text for this next list --sjl 7 Mar 92Returns a documentation string specialized on the class of the argument x itself. For example, if x is a function, the documentation string associated with the function x is returned.
\beginlist \itemitem{\typeref{function}} Returns the \term{documentation string} associated with the \term{function} \param{x}. \itemitem{\typeref{method-combination}} Returns the \term{documentation string} associated with the \term{method combination} \param{x}. \itemitem{\typeref{package}} Returns the \term{documentation string} associated with the \term{package} \param{x}. \itemitem{\typeref{standard-class} or \typeref{structure-class}} Returns the \term{documentation string} associated with the \term{class} \param{x}. \itemitem{\typeref{standard-method}} Returns the \term{documentation string} associated with the \term{method} \param{x}. \endlist
type
If x is a symbol, returns the documentation string of the class whose name is the symbol x, if there is such a class. Otherwise, it returns the documentation string of the type which is the type specifier symbol x.
If x is a structure class or standard class, returns the documentation string associated with the class x.
variable
Returns the documentation string of the dynamic variable or constant variable whose name is the symbol x.
An implementation may extend the set of \term{symbols} that are acceptable as the \param{doc-type}. If a \term{symbol} is not recognized as an acceptable \param{doc-type} by the \term{implementation}, an error must be signaled. \editornote{KMP: Can't the user extend this, too, via methods?}%!!! Rewrite per Moon's instructions:A conforming implementation or a conforming program may extend the set of symbols that are acceptable as the doc-type. This info should follow from the normal rules of method dispatching. No need to risk making it more complicated. -kmp 21-Aug-93 If \param{doc-type} is not recognized, an error is signaled.
Moon: This is useless and should be removed. KMP: Done. 1-Feb-92 For those situations where a \param{doc-type} argument is not permitted, the nature of the \term{documentation string} returned depends on the \term{type} of the \term{object} \param{x}.
None.
None.
None.
None.
This standard prescribes no means to retrieve the documentation strings for individual slots specified in a defclass form, but implementations might still provide debugging tools and/or programming language extensions which manipulate this information. Implementors wishing to provide such support are encouraged to consult the Metaobject Protocol for suggestions about how this might be done.