]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/subr.el (sit-for): Doc fix.
authorEli Zaretskii <eliz@gnu.org>
Thu, 30 Jan 2025 09:37:40 +0000 (11:37 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 3 Feb 2025 11:10:29 +0000 (12:10 +0100)
(cherry picked from commit d11488fd6fb72acd9f9356b95b2f905c59a1095d)

lisp/subr.el

index fa41ce4588ccc860506db01f30002cc02960fb5e..f3689461b2a42cdb459cad0d7a6de8f0d3af80c8 100644 (file)
@@ -3488,13 +3488,15 @@ CHARS should be a list of single characters."
                                      chars))))
 
 (defun sit-for (seconds &optional nodisp)
-  "Redisplay, then wait for SECONDS seconds.  Stop when input is available.
+  "Redisplay, then wait for SECONDS seconds; stop when input is available.
 SECONDS may be a floating-point value.
 \(On operating systems that do not support waiting for fractions of a
 second, floating-point values are rounded down to the nearest integer.)
 
-If optional arg NODISP is t, don't redisplay, just wait for input.
-Redisplay does not happen if input is available before it starts.
+If there's pending input, return nil immediately without redisplaying
+and without waiting.
+If optional arg NODISP is t, don't redisplay, just wait for input (but
+still return nil immediately if there's pending input).
 
 Value is t if waited the full time with no input arriving, and nil otherwise."
   ;; This used to be implemented in C until the following discussion: