Function: eca-api-while-no-input

eca-api-while-no-input is a macro defined in eca-api.el.

Signature

(eca-api-while-no-input &rest BODY)

Documentation

Wrap BODY in while-no-input and respecting non-essential.

If eca-api--throw-on-input is set, will throw if input is pending, else return value of body or nil if interrupted.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-api.el
(defmacro eca-api-while-no-input (&rest body)
  "Wrap BODY in `while-no-input' and respecting `non-essential'.
If `eca-api--throw-on-input' is set, will throw if input is pending, else
return value of `body' or nil if interrupted."
  (declare (debug t) (indent 0))
  `(if non-essential
       (let ((res (while-no-input ,@body)))
         (cond
          ((and eca-api--throw-on-input (equal res t))
           (throw 'input :interrupted))
          ((booleanp res) nil)
          (t res)))
     ,@body))