3eff976...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Optimize flex completion style a bit more
bug#48841, bug#47711
* lisp/minibuffer.el (completion-pcm--all-completions): Rework,
call completion--flex-score.
(completion--flex-score-1): Rework.
(completion--flex-score-last-md): New helper variable.
(completion--flex-score): New helper variable.
(completion-pcm--hilit-commonality): Rework.
1cbbd51...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Allow completion frontends to fontify results just-in-time
bug#48841, bug#47711
This allows completion-pcm--hilit-commonality to be sped up
substantially.
Introduce a new variable completion-lazy-hilit that allows for
completion frontends to opt-in an time-saving optimization by some
completions styles, such as the 'flex' and 'pcm' styles.
The variable must be bound or set by the frontend to a unique value
around a completion attempt/session. See completion-lazy-hilit
docstring for more info.
* lisp/minibuffer.el (completion-lazy-hilit): New variable.
(completion-lazy-hilit)
(completion-lazy-hilit-fn): New variable.
(completion--flex-score-1): New helper.
(completion-pcm--hilit-commonality): Use completion-lazy-hilit.