unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: The order input events are processed.
Date: Sun, 10 Sep 2006 09:05:04 -0400	[thread overview]
Message-ID: <E1GMOzg-0007mG-6L@fencepost.gnu.org> (raw)
In-Reply-To: <87ejukt7fe.fsf@lrde.org> (michael.cadilhac@lrde.org)

    > 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))))))
  \f
  ;;; 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)))))))
  \f
  ;;; Atomic change groups.

  reply	other threads:[~2006-09-10 13:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07 11:21 The order input events are processed Michaël Cadilhac
2006-09-09 20:45 ` Richard Stallman
2006-09-10  9:08   ` Michaël Cadilhac
2006-09-10 13:05     ` Richard Stallman [this message]
2006-09-10 13:14       ` Michaël Cadilhac
2006-09-10 21:28         ` Kim F. Storm
2006-09-11 14:12           ` Richard Stallman
2006-09-11 14:17             ` Kim F. Storm
2006-09-11 14:11         ` Richard Stallman
2006-09-11 14:19           ` 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=E1GMOzg-0007mG-6L@fencepost.gnu.org \
    --to=rms@gnu.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).