Function: documentation-property
documentation-property is a function defined in doc.c.
Signature
(documentation-property SYMBOL PROP &optional RAW)
Documentation
Return the documentation string that is SYMBOL's PROP property.
Third argument RAW omitted or nil means pass the result through
substitute-command-keys if it is a string.
This differs from get in that it can refer to strings stored in the
etc/DOC file; and that it evaluates documentation properties that
aren't strings.
Probably introduced at or before Emacs version 18.
Source Code
// Defined in /usr/src/emacs/src/doc.c
{
bool try_reload = documentation_dynamic_reload;
Lisp_Object tem;
retry:
tem = Fget (symbol, prop);
/* If we don't have any documentation for this symbol (and we're asking for
the variable documentation), try to see whether it's an indirect variable
and get the documentation from there instead. */
if (EQ (prop, Qvariable_documentation)
&& NILP (tem))
{
Lisp_Object indirect = Findirect_variable (symbol);
if (!NILP (indirect))
tem = Fget (indirect, prop);
}
if (BASE_EQ (tem, make_fixnum (0)))
tem = Qnil;
/* See if we want to look for the string in the DOC file. */
if (FIXNUMP (tem) || (CONSP (tem) && FIXNUMP (XCDR (tem))))
{
Lisp_Object doc = tem;
tem = get_doc_string (tem, 0);
if (NILP (tem) && try_reload)
{
/* The file is newer, we need to reset the pointers. */
reread_doc_file (Fcar_safe (doc));
try_reload = false;
goto retry;
}
}
else if (!STRINGP (tem))
/* Feval protects its argument. */
tem = Feval (tem, Qnil);
if (NILP (raw) && STRINGP (tem))
tem = calln (Qsubstitute_command_keys, tem);
return tem;
}