emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: 5x5 documentation


From: Drew Adams
Subject: RE: 5x5 documentation
Date: Tue, 21 Jun 2011 13:59:26 -0700

> It would be good if a docstring could point at some anchor
> in a manual...
>        
> It would be better to have some markup to say "hey !  go
> the point that correspond to index entry XXX where you find
> that index in this index info node", and XXX is the
> function/variable/etc... to document and that has some index
> entry.

I provided a patch to do this recently - see thread "adding manual cross-ref
links to *Help*".

However, I cannot give you a URL to that thread, because for some reason it is
not recorded in the archive!  What's up with that?

Anyway, I have since improved the code slightly.  To give it a try, or to
examine the code:
http://www.emacswiki.org/emacs/download/help-fns%2b.el

Just load the file and try `C-h v', `C-h f', etc.
See also user option `help-cross-reference-manuals'. 

(Juri will soon apply the code or otherwise provide similar behavior to Emacs.)

I made `describe-*' commands offer links to the manuals:

* `describe-mode' (each mode doc'd gets a link to manuals)
* `describe-function' and derivatives, e.g. `describe-key'
* `describe-variable'
* `describe-face'
* `describe-package'

I did this for each standard `describe-*' command that I felt could reasonably
link to manuals.  Others could also be done, in some cases linking to specific
manuals - e.g., `describe-character-set', `describe-class' (EIEIO),
`describe-generic' (EIEIO).  Some `describe-*' commands of course produce output
that has nothing that could be linked to a manual - e.g. `describe-bindings'.

Obviously anyone can use the code to add manual links for their own describe
commands.  You just need to add this sexp to the command's code, where THING is
the thing to look up (e.g. function, var, face whatever):

(Info-make-manuals-xref THING)

THING needs to match an index entry exactly (we don't want apropos matching
here).  So if the index entry has extra stuff then that needs to be taken into
account.

For example, package names are indexed with " package" after the name (e.g.
"Semantic package"), so I use this in `describe-package':

(Info-make-manuals-xref
 (concat (symbol-name package) " package"))
        
> That would also allow to make function/variable documentation
> internationalized.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]