all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jason Rumney <jasonr@gnu.org>
Cc: emacs-devel@gnu.org, klaus.berndl@sdm.de
Subject: Re: Problem with `while-no-input'
Date: Sun, 12 Mar 2006 00:00:35 +0000	[thread overview]
Message-ID: <uveukwmzg.fsf@jasonrumney.net> (raw)
In-Reply-To: <u64mkve6v.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 11 Mar 2006 23:55:52 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> After looking more closely, I now see that C-g is handled specially in
>> w32fns.c on windows in the function post_character_message. It may be
>> possible to do something in here to make while-not-input work.
>
> I thought about this as well.  It should be easy to do that for simple
> keyboard keys, but what about the other input events?

I added the code from keyboard.c for handling Vthrow_on_input to
post_character_message and the mouse button and wheel events. I think
mouse movement should also throw if the mouse is being tracked, but
the code for handling mouse tracking is in w32_read_socket (which is
synchronous and already calls kbd_buffer_store_event_hold), so I have
left that for now.


> Running too much of what keyboard.c does from within
> post_character_message might prove tricky, since
> post_character_message runs in a thread that is different from where
> the Lisp code runs, right?

I think the change I made was safe, as it only touches staticpro'ed
variables. Since that code is called from signal handlers on other
platforms it has some of the same restrictions already, the only extra
thing we have to be careful of on Windows is that it might get part
way through before the time slice is up and the Lisp thread gets
another time slice before it completes (which may involve garbage
collection).

  parent reply	other threads:[~2006-03-12  0:00 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-10  7:38 Problem with `while-no-input' klaus.berndl
2006-03-11  0:08 ` Richard Stallman
2006-03-11 12:35   ` Jason Rumney
2006-03-11 15:29     ` Jason Rumney
2006-03-11 21:55       ` Eli Zaretskii
2006-03-11 22:47         ` Jason Rumney
2006-03-12  0:00         ` Jason Rumney [this message]
2006-03-11 17:41     ` Eli Zaretskii
2006-03-11 22:45       ` Jason Rumney
2006-03-11 23:46     ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2006-04-27  6:41 klaus.berndl
2006-04-27 21:26 ` Richard Stallman
2006-04-26 12:58 klaus.berndl
2006-04-26 12:10 klaus.berndl
2006-04-26 12:43 ` Lennart Borgman
2006-04-26 12:58   ` Jason Rumney
2006-04-26 12:52 ` Jason Rumney
2006-04-26 11:46 klaus.berndl
2006-04-26 11:59 ` Jason Rumney
2006-04-26 18:05   ` Jason Rumney
2006-04-26  9:42 klaus.berndl
2006-04-26 18:53 ` Richard Stallman
2006-04-25  9:35 klaus.berndl
2006-04-25 22:05 ` Richard Stallman
2006-04-26 11:19 ` Jason Rumney
2006-03-08 14:50 klaus.berndl
2006-03-08 13:05 LENNART BORGMAN
2006-03-08 13:50 ` martin rudalics
2006-03-08 14:01   ` martin rudalics
2006-03-11 16:37   ` Eli Zaretskii
2006-03-08 14:50 ` Jason Rumney
2006-03-08 15:00 ` Stefan Monnier
2006-03-08 11:34 klaus.berndl
2006-03-08 12:41 ` Kim F. Storm
2006-03-09 17:13   ` Richard Stallman

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uveukwmzg.fsf@jasonrumney.net \
    --to=jasonr@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=klaus.berndl@sdm.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.