diff options
| author | João Távora | 2023-11-04 23:55:55 +0000 |
|---|---|---|
| committer | João Távora | 2023-11-04 23:55:55 +0000 |
| commit | 46bedebf7cdb123aa59a27f3b22a8fe9a28e0a94 (patch) | |
| tree | ef780a5d25782068ed03ceb7c138e83b7a0bf303 | |
| parent | d4d31c8c4a1103967e0a1d6099b803dfd532d1b1 (diff) | |
| download | emacs-feature/completion-lazy-hilit.tar.gz emacs-feature/completion-lazy-hilit.zip | |
Tweak completion-lazy-hilit featurefeature/completion-lazy-hilit
* lisp/minibuffer.el (completion-lazy-hilit): Make it a defvar and
rework docstring.
(completion-lazy-hilit-fn): Rework docstring.
| -rw-r--r-- | lisp/minibuffer.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index ee0a547fe9b..9fb1fa27b33 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -3754,14 +3754,14 @@ one large \"hole\" and a clumped-together \"oo\" match) higher | |||
| 3754 | than the latter (which has two \"holes\" and three | 3754 | than the latter (which has two \"holes\" and three |
| 3755 | one-letter-long matches).") | 3755 | one-letter-long matches).") |
| 3756 | 3756 | ||
| 3757 | (defvar-local completion-lazy-hilit nil | 3757 | (defvar completion-lazy-hilit nil |
| 3758 | "If non-nil, request completion lazy highlighting. | 3758 | "If non-nil, request completion lazy highlighting. |
| 3759 | 3759 | ||
| 3760 | Completion-presenting frontends may opt to bind this variable to | 3760 | Completion-presenting frontends may opt to bind this variable to |
| 3761 | non-nil value in the context of completion-producing calls (such | 3761 | non-nil value in the context of completion-producing calls (such |
| 3762 | as `completion-all-completions'). This hints the intervening | 3762 | as `completion-all-completions'). This hints the intervening |
| 3763 | completion styles that they do not need to | 3763 | completion styles that they do not need to |
| 3764 | fontify (i.e. propertize with the `face' property) completion | 3764 | fontify (i.e. propertize with a `face' property) completion |
| 3765 | strings with highlights of the matching parts. | 3765 | strings with highlights of the matching parts. |
| 3766 | 3766 | ||
| 3767 | When doing so, it is the frontend -- not the style -- who becomes | 3767 | When doing so, it is the frontend -- not the style -- who becomes |
| @@ -3780,12 +3780,12 @@ To author a completion style that takes advantage see | |||
| 3780 | `completion-pcm--hilit-commonality'.") | 3780 | `completion-pcm--hilit-commonality'.") |
| 3781 | 3781 | ||
| 3782 | (defvar completion-lazy-hilit-fn nil | 3782 | (defvar completion-lazy-hilit-fn nil |
| 3783 | "Used by completions styles honoring `completion-lazy-hilit'. | 3783 | "Function set by lazy-highlighting completions styles. |
| 3784 | When a given style wants to enable support for | 3784 | When a given style wants to enable support for |
| 3785 | `completion-lazy-hilit' (which see), that style should set this | 3785 | `completion-lazy-hilit' (which see), that style should set this |
| 3786 | variable to a function of one argument, a fresh string to be | 3786 | variable to a function of one argument, a fresh string to be |
| 3787 | displayed to the user. The function is responsible for | 3787 | displayed to the user. The function is responsible for |
| 3788 | destructively highlighting the string.") | 3788 | destructively propertizing the string with a `face' property.") |
| 3789 | 3789 | ||
| 3790 | (defun completion-lazy-hilit (str) | 3790 | (defun completion-lazy-hilit (str) |
| 3791 | "Return a copy of completion STR that is `face'-propertized. | 3791 | "Return a copy of completion STR that is `face'-propertized. |