aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2023-11-04 23:55:55 +0000
committerJoão Távora2023-11-04 23:55:55 +0000
commit46bedebf7cdb123aa59a27f3b22a8fe9a28e0a94 (patch)
treeef780a5d25782068ed03ceb7c138e83b7a0bf303
parentd4d31c8c4a1103967e0a1d6099b803dfd532d1b1 (diff)
downloademacs-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.el8
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
3754than the latter (which has two \"holes\" and three 3754than the latter (which has two \"holes\" and three
3755one-letter-long matches).") 3755one-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
3760Completion-presenting frontends may opt to bind this variable to 3760Completion-presenting frontends may opt to bind this variable to
3761non-nil value in the context of completion-producing calls (such 3761non-nil value in the context of completion-producing calls (such
3762as `completion-all-completions'). This hints the intervening 3762as `completion-all-completions'). This hints the intervening
3763completion styles that they do not need to 3763completion styles that they do not need to
3764fontify (i.e. propertize with the `face' property) completion 3764fontify (i.e. propertize with a `face' property) completion
3765strings with highlights of the matching parts. 3765strings with highlights of the matching parts.
3766 3766
3767When doing so, it is the frontend -- not the style -- who becomes 3767When 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.
3784When a given style wants to enable support for 3784When 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
3786variable to a function of one argument, a fresh string to be 3786variable to a function of one argument, a fresh string to be
3787displayed to the user. The function is responsible for 3787displayed to the user. The function is responsible for
3788destructively highlighting the string.") 3788destructively 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.