[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The dynamic-docstring-function property
From: |
Chong Yidong |
Subject: |
Re: The dynamic-docstring-function property |
Date: |
Sat, 28 Dec 2013 22:40:45 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> Is there any reason only `documentation' uses this property, and not
>> `documentation-property' or `face-documentation'?
>
> The reason is that there hasn't been a need for it.
I'm trying to document the feature now, and I don't understand why this
feature had to be introduced in the first place. Isn't it redundant
with the pre-existing `function-documentation' feature?
As noted in the Lisp manual,
-- Function: documentation function &optional verbatim
...
If FUNCTION is a symbol, this function first looks for the
`function-documentation' property of that symbol; if that has a
non-nil value, the documentation comes from that value (if the value
is not a string, it is evaluated).
Because a non-string value is evaluated, the dynamic-docstring-function
stuff can be accomplished by setting the function-documentation property
to the value `(foo ,old-docstring) where `foo' is your processing
function.