From 48a58303e68b47d79f5748f0a29bfc6708335037 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 23 Jul 1996 15:50:32 +0000 Subject: [PATCH] Add y-or-n-p-with-timeout. --- lispref/minibuf.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index b4fd597f496..380cbca3aa3 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi @@ -1174,6 +1174,13 @@ We show successive lines of echo area messages, but only one actually appears on the screen at a time. @end defun +@defun y-or-n-p-with-timeout prompt seconds default-value +Like @code{y-or-n-p}, except that if the user fails to answer within +@var{seconds} seconds, this function stops waiting and returns +@var{default-value}. It works by setting up a timer; see @ref{Timers}. +The argument @var{seconds} may be an integer or a floating point number. +@end defun + @defun yes-or-no-p prompt This function asks the user a question, expecting input in the minibuffer. It returns @code{t} if the user enters @samp{yes}, -- 2.39.5