Function: consult-info--state

consult-info--state is a byte-compiled function defined in consult-info.el.

Signature

(consult-info--state)

Documentation

Info manual preview state.

Source Code

;; Defined in ~/.emacs.d/elpa/consult-20261004.957/consult-info.el
(defun consult-info--state ()
  "Info manual preview state."
  (let ((preview (consult--jump-preview))
        (buf (and Info-current-file (current-buffer))))
    (lambda (action cand)
      (pcase action
        ('preview
         (setq cand (consult-info--position cand))
         (funcall preview 'preview
                  (pcase cand
                    (`(,matches ,pos ,_node ,_bol ,buf)
                     (cons (set-marker (make-marker) pos buf) matches))))
         (let (Info-history Info-history-list Info-history-forward)
           (when cand (ignore-errors (Info-select-node)))))
        ('return
         (consult-info--action cand (and (buffer-live-p buf) buf)))))))