emacs-devel
[Top][All Lists]
Advanced

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

Re: Patch: make eldoc indicate current argument


From: Tom Tromey
Subject: Re: Patch: make eldoc indicate current argument
Date: Wed, 27 Jun 2007 22:48:46 -0600
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux)

>>>>> "rms" == Richard Stallman <address@hidden> writes:

>     * Emacs formats documentation inconsistently.  Some functions use
>       &optional and &rest in their description.  

rms> I think you are talking about calling patterns in doc strings, not
rms> about documentation in general.  Is that right?

Yes.  Sorry about that.  This patch & my comments are solely about
eldoc and thus doc strings.

rms> Do you mean this?
rms>     (when COND BODY ...)
rms> If so, I think that is a misunderstanding.  The ellipsis here is not
rms> an argument name, it is just an ellipsis.  The space after `BODY' has
rms> no significance.

Yeah, my terminology was a bit lax.  Anyway, sometimes there is a
space, and sometimes not.  And this means that with this patch
occasionally something like "FOO..." is bold, and sometimes just the
"...".  Also the modified code doesn't understand that "..." refers to
all remaining arguments; so for instance in:

    (when (cond)
       (f1)
       (f2)
       (f3))

... if point is on (f3), nothing will be made bold in the description.

Personally I find these buglets to be minor.  But others may disagree.

rms> Perhaps we should delete that space, for consistency.
rms> Would someone like to do that?

Not me :-).

>     * If the documentation comments had a bit more structure, this could
>       also show the description of the current argument, say as a tooltip.
>       I don't think there is a reliable way to extract this information at
>       present.

rms> Alas, this would be a tremendous rewrite, and could make the doc
rms> strings less readable for their current use if we're not careful.

Good example here, thanks.  Well, another idea is to display the full
documentation comment in a tooltip, perhaps in response to some key.

This is really a side idea: it is something I've seen in Eclipse and
which is occasionally useful, and I thought maybe it would also be
useful in Emacs.  But the patch at hand doesn't really need this.

Tom




reply via email to

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