[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The order input events are processed.
From: |
Richard Stallman |
Subject: |
Re: The order input events are processed. |
Date: |
Sun, 10 Sep 2006 09:05:04 -0400 |
> One way to fix it is for sit_for to test these variables directly
> so that it doesn't need to change them. Does anyone see a problem
> with that?
Does it mean that sit-for will have to do active wait [1] ?
I see no reason to think so. It just has to check these variables
at the start.
However, I've always dreamt about an unique entry point for
unread-events: unread-command-events would store direct events (u-c-e
=3D '(?a ?b)) or events as a cons, the cdr telling if input-method has
to be used (u-c-e =3D '(?a (?b . nil) ?c)). Does it seems crazy? [2]
It seems ugly and complex. Not as good as the present scheme.
Here's the patch I have in mind. If input methods use sit-for, we
might need to create a way to refrain from testing
unread-post-input-method-events in that case.
*** subr.el 27 Jul 2006 23:33:22 -0400 1.523
--- subr.el 10 Sep 2006 08:28:34 -0400
***************
*** 1730,1745 ****
floating point support.
\(fn SECONDS &optional NODISP)"
! (when (or obsolete (numberp nodisp))
! (setq seconds (+ seconds (* 1e-3 nodisp)))
! (setq nodisp obsolete))
! (if noninteractive
! (progn (sleep-for seconds) t)
! (unless nodisp (redisplay))
! (or (<= seconds 0)
! (let ((read (read-event nil nil seconds)))
! (or (null read)
! (progn (push read unread-command-events) nil))))))
;;; Atomic change groups.
--- 1730,1749 ----
floating point support.
\(fn SECONDS &optional NODISP)"
! (unless (or unread-command-events
! unread-post-input-method-events
! unread-input-method-events
! (>= unread-command-char 0))
! (when (or obsolete (numberp nodisp))
! (setq seconds (+ seconds (* 1e-3 nodisp)))
! (setq nodisp obsolete))
! (if noninteractive
! (progn (sleep-for seconds) t)
! (unless nodisp (redisplay))
! (or (<= seconds 0)
! (let ((read (read-event nil nil seconds)))
! (or (null read)
! (progn (push read unread-command-events) nil)))))))
;;; Atomic change groups.