Function: consult--async-static
consult--async-static is a byte-compiled function defined in
consult.el.
Signature
(consult--async-static ITEMS)
Documentation
Async function with static ITEMS.
ITEMS can be a function to compute candidates lazily.
Source Code
;; Defined in ~/.emacs.d/elpa/consult-20260926.910/consult.el
(defun consult--async-static (items)
"Async function with static ITEMS.
ITEMS can be a function to compute candidates lazily."
(consult--async-dynamic
(lambda (input)
(pcase-let ((`(,re . ,hl) (consult--compile-regexp
input 'emacs completion-ignore-case)))
(when (functionp items)
(setq items (funcall items)))
(if re
(let* ((completion-regexp-list re)
(all (all-completions "" items)))
(cl-loop for s in-ref all do
(funcall hl (setf s (copy-sequence s))))
all)
(copy-sequence items))))))