+2006-07-26 Chong Yidong <cyd@stupidchicken.com>
+
+ * subr.el (sit-for): Use new SECONDS arg of read-event instead of
+ a timer.
+
2006-07-26 Mathias Dahl <mathias.dahl@gmail.com>
* tumme.el (tumme-backward-image): Add prefix argument. Add error
(progn (sleep-for seconds) t)
(unless nodisp (redisplay))
(or (<= seconds 0)
- (let ((timer (timer-create))
- (echo-keystrokes 0))
- (if (catch 'sit-for-timeout
- (timer-set-time timer (timer-relative-time
- (current-time) seconds))
- (timer-set-function timer 'with-timeout-handler
- '(sit-for-timeout))
- (timer-activate timer)
- (push (read-event) unread-command-events)
- nil)
- t
- (cancel-timer timer)
- nil)))))
+ (let ((read (read-event nil nil seconds)))
+ (or (null read)
+ (progn (push read unread-command-events) nil))))))
\f
;;; Atomic change groups.