emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Broken sit-for


From: David Kastrup
Subject: Re: Broken sit-for
Date: Sun, 10 Sep 2006 02:28:17 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

address@hidden (Kim F. Storm) writes:

> address@hidden (Kim F. Storm) writes:
>
>> I agree that (sit-for 0) should return nil if input is pending on entry.
>
> Are there any objections to installing the version of sit-for below:

[...]

> Value is t if waited the full time with no input arriving, and nil otherwise.

>     (sleep-for seconds)
>     t)
>    ((input-pending-p)
>     nil)
>    ((<= seconds 0)
>     (or nodisp (redisplay)))

The doc string for "redisplay" does not specify a return value, so
maybe you should write

     ((<= seconds 0)
      (unless nodisp (redisplay) t))

instead.

>    (t
>     (or nodisp (redisplay))
>     (let ((read (read-event nil nil seconds)))
>       (or (null read)
>         (progn (push read unread-command-events) nil))))))

This does not interfere with the myriad of other
unread-command-events like variables we have?  They are sure to be
unused at this point of time?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]