(life-display-generation): Test for input manually if `sleeptime' is negative
authorEli Zaretskii <eliz@gnu.org>
Sat, 9 Sep 2006 10:43:49 +0000 (10:43 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 9 Sep 2006 10:43:49 +0000 (10:43 +0000)
or null.

lisp/ChangeLog
lisp/play/life.el

index a52ffeb..c81c9cb 100644 (file)
@@ -1,5 +1,8 @@
 2006-09-09  Micha\e,Ak\e(Bl Cadilhac  <michael.cadilhac@lrde.org>
 
+       * play/life.el (life-display-generation): Test for input manually if
+       `sleeptime' is negative or null.
+
        * lpr.el (lpr-page-header-switches): Page title switch is one of them.
        (print-region-1): Substitute `%s' with the page title.
 
index 263c445..a034c38 100644 (file)
@@ -269,7 +269,8 @@ generations (this defaults to 1)."
   (recenter 0)
 
   ;; Redisplay; if the user has hit a key, exit the loop.
-  (or (eq t (sit-for sleeptime))
+  (or (and (sit-for sleeptime) (< 0 sleeptime))
+      (not (input-pending-p))
       (throw 'life-exit nil)))
 
 (defun life-extinct-quit ()