On 9.06.05, Lars Gullik Bj�nnes wrote:
> [EMAIL PROTECTED] writes:
>
> | On Thu, 9 Jun 2005, G. Milde wrote:
> >
> >> On 8.06.05, Jean-Marc Lasgouttes wrote:
> >> > >>>>> "G" == G Milde <[EMAIL PROTECTED]> writes:
> >>
> >> > G> ... all the lfuns should have some usage doc (telling the
> >> > G> expected arguments).
> | Going off on a slight tangent, what if we put some cursory documentation
> | of the lfuns in the *source* code using wiki markup?
> | Especially since we'd avoid maintaining separate documentation of the
> | lfuns, and anything that makes it easier for the developers to document
> | changes to the lfun ought to be a good thing...
>
> You made it harder... now we have to know wiki markup.
Actually, we need only basic data, markup can be added by the script.
Currently, in LyXAction.C are lines like
{ LFUN_WRITEAS, "buffer-write-as", ReadOnly },
{ LFUN_CANCEL, "cancel", NoBuffer },
{ LFUN_INSET_CAPTION, "caption-insert", Noop },
{ LFUN_LEFT, "char-backward", ReadOnly | NoUpdate},
If these lines where completed by comments as e.g.
// { LFUN, "public name", flags }, // (argument(s)), Synopsis (optional)
{ LFUN_WRITEAS, "buffer-write-as", ReadOnly }, // (filename), write buffer to
new file
{ LFUN_CANCEL, "cancel", NoBuffer }, // (), cancel action
{ LFUN_INSET_CAPTION, "caption-insert", Noop },
{ LFUN_LEFT, "char-backward", ReadOnly | NoUpdate}, // ()
the basic information would rest with the source and could be extracted
automatically.
Detailled description of important lfuns could be stored in a template
for a new "Reference.lyx". A script would to merge the information from
source, template, and configuration files:
* LyXAction.C provides the up to date list about available lfuns
* For each of the lfuns defined there, we look for
- name, flags, argument list, synopsis in LyXAction.C itself
- keybinding in LYXDIR/bind/ (looking in preferences for the chosen
emulation)
- toolbar and menu entry in LYXDIR/ui/ (looking in preferences for
the chosen emulation)
The basic idea is that a reference document is generated for the
chosen setting at the site (comparable to the latex config doc
generation with chkconfig.ltx).
G�nter
--
G.Milde web.de