diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2006-07-10 18:52:13 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2006-07-10 18:52:13 +0000 |
commit | 0369eb8545cb960836e64e81d14bf1db357a925f (patch) | |
tree | d1082d6466bcabe84351742fd035a5421ca5be6b /lisp/play/hanoi.el | |
parent | 7157b8fe893c3d6a213d133588f85117a7d80250 (diff) | |
download | emacs-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.el | 5 |
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) |