summaryrefslogtreecommitdiff
path: root/lisp/play/hanoi.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-07-10 18:52:13 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-07-10 18:52:13 +0000
commit0369eb8545cb960836e64e81d14bf1db357a925f (patch)
treed1082d6466bcabe84351742fd035a5421ca5be6b /lisp/play/hanoi.el
parent7157b8fe893c3d6a213d133588f85117a7d80250 (diff)
downloademacs-0369eb8545cb960836e64e81d14bf1db357a925f.tar.gz
* subr.el (sit-for): New function.
* play/hanoi.el (hanoi-sit-for): Check sit-for return value.
Diffstat (limited to 'lisp/play/hanoi.el')
-rw-r--r--lisp/play/hanoi.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el
index 296ca82b64a..40a96f4e6c2 100644
--- a/lisp/play/hanoi.el
+++ b/lisp/play/hanoi.el
@@ -399,9 +399,8 @@ BITS must be of length nrings. Start at START-TIME."
;; update display and pause, quitting with a pithy comment if the user
;; hits a key.
(defun hanoi-sit-for (seconds)
- (sit-for seconds)
- (if (input-pending-p)
- (signal 'quit '("I can tell you've had enough"))))
+ (unless (sit-for seconds)
+ (signal 'quit '("I can tell you've had enough"))))
;; move ring to a given buffer position and update ring's car.
(defun hanoi-ring-to-pos (ring pos)