Function Documentation



On 2013-08-14, Raymond Toy <toy.raymond at gmail.com> wrote:
>>>>>> "Richard" == Richard Fateman <fateman at gmail.com> writes:

>    Richard> I think it is not currently possible, but it would be very nice to have.
>
> I agree.

I'm in favor only if the user-defined documentation is wedged into the
built-in documentation system. Having different kinds of documentation
is messy.

> Robert Dodier also added support so that other texinfo files can be
> included.  I think the intent there was so that share packages could
> have texinfo documentation that would be automatically included in the
> search that describe does.  I don't remember exactly how this works,
> though. 

For the record, the modifications were to process Texinfo files in share
directories via make, generating index files of the same kind as the
built-in documentation, which could then be loaded (by hand, that bit
didn't get automated) at run time.

>    Richard> Here's a way one might handle what you've suggested...
>    Richard> have a command, say
>    Richard> document(name,  "document string .... perhaps in html or TeX or ...");
>    Richard> that associates name with the documentation.
>
>    Richard> Add to describe(X) a preliminary search for document string(s)
>    Richard> associated with X,
>    Richard> and then access the reference manual.
>
> I think this is a reasonable interface.  Probably want to be sure to
> clear the documentation if the function is redefined.

A problem with a function to add documentation is that the
documentation can't be found until the function is evaluated.
I think that's a bit of a roadblock.

> I've also wanted describe to return docstrings from internal maxima
> Lisp functions.

I'm not sure I want that. How about a separate function to return
docstrings.

best

Robert Dodier