Function: corfu-quick--read

corfu-quick--read is a byte-compiled function defined in corfu-quick.el.

Signature

(corfu-quick--read &optional FIRST)

Documentation

Read quick key given FIRST pressed key.

Source Code

;; Defined in ~/.emacs.d/elpa/corfu-20260821.1158/corfu-quick.el
(defun corfu-quick--read (&optional first)
  "Read quick key given FIRST pressed key."
  (cl-letf* ((list nil)
             (orig (symbol-function #'corfu--format-candidates))
             ((symbol-function #'corfu--format-candidates)
              (lambda (cands)
                (setq cands (funcall orig cands))
                (cl-loop for cand in-ref (nth 2 cands) for index from 0 do
                         (pcase-let ((`(,keys . ,events) (corfu-quick--keys first index)))
                           (setf list (nconc events list)
                                 cand (concat keys (substring cand (min (length cand) (length keys)))))))
                cands)))
    (corfu--candidates-popup
     (posn-at-point (+ (car completion-in-region--data) (length corfu--base))))
    (alist-get (read-key) list)))