]> git.eshelyaron.com Git - emacs.git/commit
Allow completion frontends to fontify candidates just-in-time
authorJoão Távora <joaotavora@gmail.com>
Wed, 25 Oct 2023 12:45:01 +0000 (13:45 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 6 Nov 2023 16:13:02 +0000 (10:13 -0600)
commitdfffb91a70532ac0021648ba692336331cbe0499
tree0edc529442a0c8dcf51564db056e4dd366fa1481
parent94807b6896191245ff3bef44a0ec21efb918232f
Allow completion frontends to fontify candidates just-in-time

bug#48841, bug#47711

The variable may be bound by the frontend to a non-nil around
completion-producing calls like completion-all-completions.  See
completion-lazy-hilit docstring for more info.

* lisp/icomplete.el (icomplete-minibuffer-setup): Set completion-lazy-hilit.
(icomplete--render-vertical): Call completion-lazy-hilit.
(icomplete-completions): Call completion-lazy-hilit.

* lisp/minibuffer.el (completion-lazy-hilit): New variable.
(completion-lazy-hilit): New function.
(completion-lazy-hilit-fn): New variable.
(completion-pcm--regexp)
(completion--flex-score-last-md): New helper variables.
(completion--flex-score-1): New helper.
(completion-pcm--hilit-commonality): Use completion-lazy-hilit.
(completion--flex-adjust-metadata): Rework sorting code.

* etc/NEWS: Mention completion-lazy-hilit
etc/NEWS
lisp/icomplete.el
lisp/minibuffer.el