Function: y-or-n-p-with-timeout
y-or-n-p-with-timeout is a byte-compiled function defined in
timer.el.gz.
Signature
(y-or-n-p-with-timeout PROMPT SECONDS DEFAULT-VALUE)
Documentation
Like (y-or-n-p PROMPT), with a timeout.
If the user does not answer after SECONDS seconds, return DEFAULT-VALUE.
Probably introduced at or before Emacs version 19.31.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/timer.el.gz
(defun y-or-n-p-with-timeout (prompt seconds default-value)
"Like (y-or-n-p PROMPT), with a timeout.
If the user does not answer after SECONDS seconds, return DEFAULT-VALUE."
(with-timeout (seconds default-value)
(y-or-n-p prompt)))