[Top][All Lists]

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

Re: Broken sit-for

From: Michaël Cadilhac
Subject: Re: Broken sit-for
Date: Fri, 08 Sep 2006 11:16:34 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

address@hidden (Kim F. Storm) writes:

> I agree that (sit-for 0) should return nil if input is pending on entry.
> Can you try the following version of sit-for?

I did, and indeed it fixes the bug for life.el, thanks !

> [It assumes that `redisplay' returns t if display completed, nil if
> there is pending input.  The code does that, but the doc string
> doesn't say so explicitly...  so its doc string should be fixed.]
> (defun sit-for (seconds &optional nodisp obsolete)
>   "Perform redisplay, then wait for SECONDS seconds or until input is 
> available.
> SECONDS may be a floating-point value.
> \(On operating systems that do not support waiting for fractions of a
> second, floating-point values are rounded down to the nearest integer.)
> If optional arg NODISP is t, don't redisplay, just wait for input.
> Redisplay does not happen if input is available before it starts.
> Value is t if waited the full time with no input arriving, and nil otherwise.

Maybe this  part of  the docstring should  be slightly changed  to say
that a negative or null value of SECONDS is not considered to be fully
waited if an input was pending before the call to sit-for.

 |      Michaël `Micha' Cadilhac   |  Mieux vaut se taire                   |
 |         Epita/LRDE Promo 2007   |   Que de parler trop fort.             |
 | http://www.lrde.org/~cadilh_m   |           -- As de trèfle              |
 `--  -   JID: address@hidden --'                                   -  --'

Attachment: pgpVnSUOlQXSl.pgp
Description: PGP signature

reply via email to

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