emacs-devel
[Top][All Lists]
Advanced

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

Re: completion-auto-help


From: Stefan Monnier
Subject: Re: completion-auto-help
Date: Thu, 10 Nov 2005 23:55:28 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> The Elisp manual says this about it:

>  If this variable is non-`nil', the completion commands
>  automatically display a list of possible completions whenever
>  nothing can be completed because the next character is not
>  uniquely determined.

> In neither case are different non-nil values distinguished. So, I don't
> understand this code in complete.el:

> (if (or (eq completion-auto-help t)
>         (and completion-auto-help
>              (eq last-command this-command))
>         (eq mode 'help))

complete.el extends the meaning of the variable so that a non-nil non-t
value means "show the help but only on the second attempt to complete".
I.e. if TAB finds nothing to complete, the first TAB will just say "[Next
char not unique]" without bringing up the *Completions* buffer, and the
second TAB will then bring up the *Completions* buffer.
It happens to be my favorite behavior.

> 2. New feature proposal - How about allowing for an
> "always-display-*Completions*' behavior:

>  - t means what it means now
>  - nil means what it means now
>  - other means this:

We could have

   t = what it means now
   nil = what it means now
   eager = what you suggest (always show the completions and update them
                             after each key stroke)
   lazy = what complete.el does for non-nil non-t values

> IOW, with this value, the user would not need to hit `TAB' to display
> *Completions*. (S)he would see the list of completions whenever there are
> more than one. There is currently no way to make `completing-read',
> `read-file-name' etc. display *Completions* from the outset.

Indeed.  The closest is icomplete-mode.


        Stefan




reply via email to

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