From: michael.cadilhac@lrde.org (Michaël Cadilhac)
Cc: emacs-devel@gnu.org
Subject: Re: Broken sit-for
Date: Fri, 08 Sep 2006 11:16:34 +0200 [thread overview]
Message-ID: <87d5a6d8gd.fsf@lrde.org> (raw)
In-Reply-To: <m3r6yniwev.fsf_-_@kfs-l.imdomain.dk> (Kim F. Storm's message of "Thu, 07 Sep 2006 16:27:52 +0200")
[-- Attachment #1.1: Type: text/plain, Size: 1522 bytes --]
storm@cua.dk (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: micha@amessage.be --' - --'
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2006-09-08 9:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-06 17:05 Minor fix for life.el Michaël Cadilhac
2006-09-06 18:03 ` David Kastrup
2006-09-06 18:14 ` Michaël Cadilhac
2006-09-06 18:34 ` David Kastrup
2006-09-07 14:27 ` Broken sit-for [was: Re: Minor fix for life.el.] Kim F. Storm
2006-09-08 9:16 ` Michaël Cadilhac [this message]
2006-09-09 23:02 ` Kim F. Storm
2006-09-10 0:28 ` Broken sit-for David Kastrup
2006-09-10 9:18 ` Michaël Cadilhac
2006-09-10 21:26 ` Kim F. Storm
2006-09-11 14:22 ` Michaël Cadilhac
2006-09-10 21:06 ` Kim F. Storm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d5a6d8gd.fsf@lrde.org \
--to=michael.cadilhac@lrde.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).