[Top][All Lists]

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

Re: Improved help from minibuffer prompts

From: Stefan Monnier
Subject: Re: Improved help from minibuffer prompts
Date: 01 May 2004 16:23:07 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> The problem is, describe-function-1 is a big hairy function with a
> complex program flow.

Yes.  I'd just call it ugly.

> describe-function-1 uses princ to output data to the current buffer,

Yup and there's only one place where this happens, so despite the ugly
control flow there's clearly just one place where you can insert a call to
your function, knowing that the arglist has just been inserted at point.

Maybe the best way is not to call your new function right then and there.
Maybe it's better to just remember the buffer position of start&end of
arglist and do the highlighting later.

> All in all, I really doubt the result is easier to understand or
> maintain.

It's more robust since it does not assume the arglist is printed
and it does not make assumption about where it's printed, etc...

>  - No heuristics to determine what's a usage doc and what's simply doc.
>    OK, but the format of docs is something we control so we can be
>    reasonably sure it's working, and we can always adapt
>    help-highlight-arguments if necessary.

I'm reasonably sure I can already come up with an example where your
code ends up doing funny things.

>  - All functions that use describe-function-1 are automatically
>    highlighted.

Irrelevant indeed.


reply via email to

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