From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Broken sit-for
Date: Sun, 10 Sep 2006 23:06:09 +0200 [thread overview]
Message-ID: <m3ac57a0u6.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <85irjwbm5a.fsf@lola.goethe.zz> (David Kastrup's message of "Sun\, 10 Sep 2006 02\:28\:17 +0200")
David Kastrup <dak@gnu.org> writes:
> storm@cua.dk (Kim F. Storm) writes:
>
>> storm@cua.dk (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,
I have fixed that.
>
>> (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?
It does (but that's how the code looks now).
Perhaps it should simply use unread-post-input-method-events instead
of unread-command-events.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
prev parent reply other threads:[~2006-09-10 21:06 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 ` Broken sit-for Michaël Cadilhac
2006-09-09 23:02 ` Broken sit-for [was: Re: Minor fix for life.el.] 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 [this message]
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=m3ac57a0u6.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--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).