]> git.eshelyaron.com Git - emacs.git/commit
New customization variable `completion-eager-display'
authorDaniel Mendler <mail@daniel-mendler.de>
Sun, 8 Dec 2024 19:05:07 +0000 (20:05 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 14 Jan 2025 13:09:41 +0000 (14:09 +0100)
commit7028bd93775bc6f101fe6ecd31fba4cffd39cc98
tree47da8122e6393f15bab81f44a525c22e1504bd9d
parentb842d027859f849d5ee06389fb8abf7f0bf0f337
New customization variable `completion-eager-display'

The customization option can be set to t or nil, to respectively
always or never show the *Completions* buffer eagerly at the
beginning of a completion session.  Furthermore the option can
be set to the value auto.  In this case the *Completions* buffer
will only be shown if requested by the completion table.
Completion tables can use the `eager-display' completion
metadata to do so.  (Bug#74616, Bug#74617)

* lisp/minibuffer.el (completion-eager-display): New
customization variable.
(completion-metadata): Update docstring, document the
new `eager-display' completion metadata.
(completion-extra-properties): Update docstring, document the
new `:eager-display' completion metadata.
(completion-category-overrides): Add `eager-display' to the
custom type specification.
(completing-read-default): Handle the `completion-eager-display'
customization variable and the `eager-display' completion
metadata.
(completion-table-with-metadata): New function to create
a completion table with metadata.
(minibuffer-complete-defaults, minibuffer-complete-history):
Use it.
* lisp/ffap.el (ffap-menu-ask): Add `ffap-menu' completion
category and `eager-display' completion metadata.  Use
`completion-table-with-metadata'.
* lisp/imenu.el (imenu-eager-completion-buffer): Correct
docstring, which had been inverted.
(imenu--completion-buffer): Add `eager-display' completion
metadata.  Use `completion-table-with-metadata'.
* lisp/tmm.el (tmm-prompt): Add `tmm' completion category and
`eager-display' completion metadata.  Use
`completion-table-with-metadata'.  Add keymap setup.
(tmm-add-prompt): Remove keymap setup.
(tmm-goto-completions): Call `tmm-add-prompt' to ensure that a
*Completions* buffer is shown.
(tmm--completion-table): Remove unused internal function.
* etc/NEWS: Announce the change.

(cherry picked from commit fd021c07606264a73cd4c1f6fa6fe80a756defe0)
lisp/imenu.el
lisp/minibuffer.el