[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with `while-no-input'

From: Jason Rumney
Subject: Re: Problem with `while-no-input'
Date: Sat, 11 Mar 2006 22:45:11 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

Eli Zaretskii <address@hidden> writes:

> Anyway, I see in w32fns.c:post_character_message that C-g is handled
> specially in this function.  When we detect C-g, we signal the special
> interrupt_handle.  However, I'm not quite sure who and how sees that
> this handle is signaled: sys_select isn't called while the body of
> while-no-input runs in this case, since that body is pure Lisp code,
> right?  What am I missing?
> I also see in the debugger that, when the while-no-input form runs,
> w32_read_socket is not called.  I think this explains why Emacs
> doesn't see the input, and doesn't interrupt the form's body:
> w32_read_socket is the only way to receive input on Windows, right?
> I think we can arrange for _any_ input to interrupt a while-no-input
> form, but this needs to be done from w32_wnd_proc (which is in another
> thread, right?).  Do you think this is a good approach?

Yes. If async input can be handled on other platforms, then it should
be possible to handle input in w32_wnd_proc instead of passing it on
to be handled by w32_read_socket. But there may be a simpler fix of
setting a flag in post_character_message if noone has time to look at
that immediately.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]