Mercurial > emacs
changeset 72138:0d8b226a4a76
* subr.el (sit-for): Use new SECONDS arg of read-event instead of
a timer.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 26 Jul 2006 18:18:26 +0000 |
parents | 82ede0c5373b |
children | 8eab314cd76e |
files | lisp/ChangeLog lisp/subr.el |
diffstat | 2 files changed, 8 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Jul 26 18:16:32 2006 +0000 +++ b/lisp/ChangeLog Wed Jul 26 18:18:26 2006 +0000 @@ -1,3 +1,8 @@ +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
--- a/lisp/subr.el Wed Jul 26 18:16:32 2006 +0000 +++ b/lisp/subr.el Wed Jul 26 18:18:26 2006 +0000 @@ -1737,19 +1737,9 @@ (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)))))) ;;; Atomic change groups.