]> git.eshelyaron.com Git - emacs.git/commit
Improve icomplete-vertical-mode and fido-vertical-mode
authorJoão Távora <joaotavora@gmail.com>
Sun, 30 May 2021 15:26:02 +0000 (16:26 +0100)
committerJoão Távora <joaotavora@gmail.com>
Tue, 1 Jun 2021 09:40:54 +0000 (10:40 +0100)
commit05ab6e53e2cc82edb0b0916c880bdaa269267528
treeee170ac1dda968069aa440a3885ef74a0cea6a69
parent062f5aa640db1b8208f9c45dd12fea08e85658d9
Improve icomplete-vertical-mode and fido-vertical-mode

This mode is intended to be used with Icomplete ('M-x icomplete-mode')
or Fido ('M-x fido-mode'), to display the list of completions
candidates vertically instead of horizontally.  When used with
Icomplete, completions are rotated and selection kept at the top.
When used with Fido, completions scroll like a typical dropdown
widget.

If the dropdown behaviour is desired for Icomplete (instead of
rotation), icomplete-scroll can be adjusted separately by the user.

* etc/NEWS (icomplete-vertical-mode): Reword.

* lisp/icomplete.el (simple): Require it.
(icomplete-selected-match): New face.
(icomplete-scroll): New user-visible var.
(icomplete-forward-completions): Rework.
(icomplete-backward-completions): Rework.
(icomplete--fido-mode-setup): Prefer icomplete-scroll according to
icomplete-vertical mode.
(icomplete-minibuffer-setup): Initialize icomplete--scrolled-completions.
(fido-vertical-mode): An alias for icomplete-vertical-mode.
(icomplete-exhibit): Init icomplete--scrolled-past.  Adjust overlay.
(icomplete--render-vertical): New helper.
(icomplete--sorted-completions): If cache is stale, also
invalidate icomplete--scrolled-past.
(icomplete-completions): Rework.  Mostly reformat.

* lisp/simple.el (max-mini-window-lines): New helper.
(display-message-or-buffer): Use it.
etc/NEWS
lisp/icomplete.el
lisp/simple.el