Function: consult--define-state

consult--define-state is a macro defined in consult.el.

Signature

(consult--define-state TYPE)

Documentation

Define state function for TYPE.

Source Code

;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defmacro consult--define-state (type)
  "Define state function for TYPE."
  `(defun ,(intern (format "consult--%s-state" type)) ()
     ,(format "State function for %ss with preview.
The result can be passed as :state argument to `consult--read'." type)
     (consult--state-with-return (,(intern (format "consult--%s-preview" type)))
                                 #',(intern (format "consult--%s-action" type)))))