~suntong001/emacs-starter-kit/+git/master:feature/completion-lazy-hilit

Last commit made on 2023-11-04
Get this branch:
git clone -b feature/completion-lazy-hilit https://git.launchpad.net/~suntong001/emacs-starter-kit/+git/master

Branch merges

Branch information

Name:
feature/completion-lazy-hilit
Repository:
lp:~suntong001/emacs-starter-kit/+git/master

Recent commits

46bedeb... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

Tweak completion-lazy-hilit feature

* lisp/minibuffer.el (completion-lazy-hilit): Make it a defvar and
rework docstring.
(completion-lazy-hilit-fn): Rework docstring.

d4d31c8... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

* lisp/icomplete.el (icomplete-exhibit): Remove instrumentation.

5b0526a... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

Fix completion-lazy-hilit docstrings

Also fix a potential bug, simplify code and address a FIXME.

* lisp/minibuffer.el (completion-lazy-hilit)
(completion-lazy-hilit-fn)
(completion-pcm--hilit-commonality): Fix docstring and simplify.
(completion--flex-adjust-metadata): Simplify.

4937e87... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

Don't propertize strings when lazy-highlighting completions

* lisp/minibuffer.el (completion--twq-all): Store
completion--quoted in string.
(completion-pcm--regexp): New helper variable.
(completion-pcm--hilit-commonality): Rework.
(completion--flex-adjust-metadata): Rework sorting code.

1620faf... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

Revert most of "Optimize flex completion style a bit more"

The performace optimization introduces problems and isn't worth it.
The refactorings into separate functions are useful, though.

bug#48841, bug#47711

d910858... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

Revert "Fix performance regression in completion-pcm--all-completions"

The performance optimization introduces problems and isn't worth it.

bug#48841, bug#47711

This reverts commit 54a6079ba4c94ba6d8b56987400feeabe0c77955.

54a6079... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

Fix performance regression in completion-pcm--all-completions

* lisp/minibuffer.el (completion-pcm--all-completions): Don't copy-sequence.

e00728e... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

Rework docstring for completion-lazy-hilit

bug#48841, bug#47711

* lisp/minibuffer.el (completion-lazy-hilit): Rework docstring.

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/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)
(completion-lazy-hilit-fn): New variable.
(completion--flex-score-1): New helper.
(completion-pcm--hilit-commonality): Use completion-lazy-hilit.