[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch: make eldoc indicate current argument
From: |
Stefan Monnier |
Subject: |
Re: Patch: make eldoc indicate current argument |
Date: |
Tue, 17 Jul 2007 00:36:42 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> I was aware of such things (optional parameters in brackets), but
> didn't figure out what to do with them:
> ;; FIXME: What to do with optional arguments, like in
> ;; (defun NAME ARGLIST [DOCSTRING] BODY...) case?
> ;; The problem is there is no robust way to determine if
> ;; the current argument is indeed a docstring.
> Doc strings are so important that eldoc may as well have special-case
> code for them.
Hmm.... I'm trying to figure out in which circumstance it would be useful or
even possible to distinguish the two args in the help info:
- if point is on the second sexp (or further) in the body, it obviously
won't make any difference.
- so it only makes a potential difference if point is on the first sexp in
the body.
- if we don't do anything special, this will always be listed as being on
[DOCSTRING].
- so if we're looking at a string, this is right unless there's
no sexp afterwards.
- if we're looking at nothing, then selecting [DOCSTRING] is as good
as any.
- if we're looking at an open paren an open [, then this is wrong,
although only marginally so: we're just *before* the BODY and the user may
decide to insert a docstring at point, so showing [DOCSTRING] isn't such
a bad idea after all.
- we're inside a number or a symbol: this case is indeed just wrong and the
help data should indicate we're in the BODY part.
-- Stefan
- Re: Patch: make eldoc indicate current argument, (continued)
- Re: Patch: make eldoc indicate current argument, Richard Stallman, 2007/07/13
- Re: Patch: make eldoc indicate current argument, Juanma Barranquero, 2007/07/14
- Re: Patch: make eldoc indicate current argument, David Kastrup, 2007/07/14
- Re: Patch: make eldoc indicate current argument, Richard Stallman, 2007/07/14
- Re: Patch: make eldoc indicate current argument, Juanma Barranquero, 2007/07/15
- Re: Patch: make eldoc indicate current argument, Richard Stallman, 2007/07/15
- Re: Patch: make eldoc indicate current argument, Johan Bockgård, 2007/07/15
- Re: Patch: make eldoc indicate current argument, Richard Stallman, 2007/07/15
- Re: Patch: make eldoc indicate current argument, Paul Pogonyshev, 2007/07/15
- Re: Patch: make eldoc indicate current argument, Richard Stallman, 2007/07/16
- Re: Patch: make eldoc indicate current argument,
Stefan Monnier <=
- Re: Patch: make eldoc indicate current argument, Richard Stallman, 2007/07/18