Function: completion-lazy-hilit

completion-lazy-hilit is a byte-compiled function defined in compat-30.el.

Signature

(completion-lazy-hilit STR)

Documentation

[Compatibility function for completion-lazy-hilit(var)/completion-lazy-hilit(fun), defined in Emacs 30.1. See
(compat) Emacs 30.1' for more details.]

Return a copy of completion candidate STR that is face-propertized. See documentation of the variable completion-lazy-hilit(var)/completion-lazy-hilit(fun) for more details.

Source Code

;; Defined in ~/.emacs.d/elpa/compat-30.1.0.1/compat-30.el
(compat-defvar completion-lazy-hilit nil ;; <compat-tests:completion-lazy-hilit>
  "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'.")