]> git.eshelyaron.com Git - emacs.git/commit
New commands for cycling completions and restoring completed input
authorEshel Yaron <me@eshelyaron.com>
Sun, 14 Jan 2024 14:47:05 +0000 (15:47 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 14 Jan 2024 14:47:05 +0000 (15:47 +0100)
commitdf4e37a7fb3337e75e704819fc63a7df525ec7f3
tree392524113cacc49e9995736a785197509d873425
parent248b6b5e88d125d4c9a56edc4282425f85c664c1
New commands for cycling completions and restoring completed input

This adds two new minibuffer commands, 'minibuffer-cycle-completion'
and 'minibuffer-restore-completion-input', bound to 'C-o' and 'C-l',
respectively.

* lisp/minibuffer.el (completion--input): New local variable.
(minibuffer--cache-completion-input)
(completion-switch-cycling-direction): New functions.
(completion-all-sorted-completions): Respect
'minibuffer-completions-sort-function', and...
(minibuffer-completion-help)
(completion--do-completion): Cache completion input.
(completions-auto-update): Preserve 'completion--input'.
(minibuffer-force-complete): Highlight inserted candidate in
completions list if *Completions* is already visible.
(minibuffer-cycle-completion)
(minibuffer-restore-completion-input): New commands.
(minibuffer-local-completion-map): Bind them.

* doc/emacs/mini.texi (Completion Commands, Completion Options)
* doc/lispref/minibuf.texi (Completion Commands): Document them.

* etc/NEWS: Announce.

* test/lisp/minibuffer-tests.el (restore-completion-input-test):
New test.
doc/emacs/mini.texi
doc/lispref/minibuf.texi
etc/NEWS
lisp/minibuffer.el
test/lisp/minibuffer-tests.el