]> 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>
Fri, 19 Jan 2024 10:08:42 +0000 (11:08 +0100)
commit03686bcffc3a1a5419a7dea7b839015396da98bc
tree43fe3353497e2b0adc9a318e7862917e23183241
parentb12faa2988f714d436e3c0687c27c7cf9782fc18
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