Variable: completion-lazy-hilit

completion-lazy-hilit is a variable defined in minibuffer.el.gz.

Value

nil

Documentation

If non-nil, request lazy highlighting of completion candidates.

Lisp programs (a.k.a. "front ends") that present completion candidates may opt to bind this variable to a non-nil value when calling functions (such as completion-all-completions) which produce completion candidates. This tells the underlying completion styles that they do not need to fontify (i.e., propertize with the face property) completion candidates in a way that highlights the matching parts. Then it is the front end which presents the candidates that becomes responsible for this fontification. The front end does that by calling the function completion-lazy-hilit(var)/completion-lazy-hilit(fun) on each completion candidate that is to be displayed to the user.

Note that only some completion styles take advantage of this variable for optimization purposes. Other styles will ignore the hint and fontify eagerly as usual. It is still safe for a front end to call completion-lazy-hilit(var)/completion-lazy-hilit(fun) in these situations.

To author a completion style that takes advantage of this variable, see completion-lazy-hilit-fn and completion-pcm--hilit-commonality.

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defvar completion-lazy-hilit nil
  "If non-nil, request lazy highlighting of completion candidates.

Lisp programs (a.k.a. \"front ends\") that present completion
candidates may opt to bind this variable to a non-nil value when
calling functions (such as `completion-all-completions') which
produce completion candidates.  This tells the underlying
completion styles that they do not need to fontify (i.e.,
propertize with the `face' property) completion candidates in a
way that highlights the matching parts.  Then it is the front end
which presents the candidates that becomes responsible for this
fontification.  The front end does that by calling the function
`completion-lazy-hilit' on each completion candidate that is to be
displayed to the user.

Note that only some completion styles take advantage of this
variable for optimization purposes.  Other styles will ignore the
hint and fontify eagerly as usual.  It is still safe for a
front end to call `completion-lazy-hilit' in these situations.

To author a completion style that takes advantage of this variable,
see `completion-lazy-hilit-fn' and `completion-pcm--hilit-commonality'.")