[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `y-or-n-p' does not wait for input - assumes `n'
From: |
Kim F. Storm |
Subject: |
Re: `y-or-n-p' does not wait for input - assumes `n' |
Date: |
Thu, 27 Jan 2005 10:10:15 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
Luc Teirlinck <address@hidden> writes:
> Kim Storm wrote:
>
> Wouldn't it be better to fix this in C code so other potential uses of
> y-or-n-p and yes-or-no-p during track-mouse do not need to be fixed
> as well ?
>
> The problem is that `track-mouse' not only messes up y-or-n-p and
> yes-or-no-p. It messes up all functions that are trying to read user
> input without wanting to track mouse motion.
True. You cannot know whether a call to read-event expects to
handle mouse-movement, so in general you must assume it does when
invoked while track-mouse. I.e. you need to be careful if you
use read-event in hooks or timer or async functions.
On the other hand, y-or-n-p never need to handle mouse-movement, so it
seems logical to turn track-mouse off in cases where we know it may
cause problems. To me it seems much more likely that it is necessary
to call y-or-n-p rather than read-event in async code.
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: `y-or-n-p' does not wait for input - assumes `n', (continued)
- Re: `y-or-n-p' does not wait for input - assumes `n', Luc Teirlinck, 2005/01/23
- Re: `y-or-n-p' does not wait for input - assumes `n', Richard Stallman, 2005/01/24
- Re: `y-or-n-p' does not wait for input - assumes `n', Luc Teirlinck, 2005/01/24
- Re: `y-or-n-p' does not wait for input - assumes `n', Richard Stallman, 2005/01/25
- Re: `y-or-n-p' does not wait for input - assumes `n', Luc Teirlinck, 2005/01/25
- Re: `y-or-n-p' does not wait for input - assumes `n', Richard Stallman, 2005/01/26
- Re: `y-or-n-p' does not wait for input - assumes `n', Stefan Monnier, 2005/01/26
- Re: `y-or-n-p' does not wait for input - assumes `n', Richard Stallman, 2005/01/27
- Re: `y-or-n-p' does not wait for input - assumes `n', Kim F. Storm, 2005/01/26
- Re: `y-or-n-p' does not wait for input - assumes `n', Luc Teirlinck, 2005/01/26
- Re: `y-or-n-p' does not wait for input - assumes `n',
Kim F. Storm <=
- Re: `y-or-n-p' does not wait for input - assumes `n', Richard Stallman, 2005/01/27
- Re: `y-or-n-p' does not wait for input - assumes `n', Kim F. Storm, 2005/01/27
- Re: `y-or-n-p' does not wait for input - assumes `n', Luc Teirlinck, 2005/01/27
- Re: `y-or-n-p' does not wait for input - assumes `n', Stefan Monnier, 2005/01/27
- Re: `y-or-n-p' does not wait for input - assumes `n', Richard Stallman, 2005/01/28
- Re: `y-or-n-p' does not wait for input - assumes `n', Stefan Monnier, 2005/01/28
- RE: `y-or-n-p' does not wait for input - assumes `n', Drew Adams, 2005/01/28
- Re: `y-or-n-p' does not wait for input - assumes `n', Richard Stallman, 2005/01/28
- RE: `y-or-n-p' does not wait for input - assumes `n', Drew Adams, 2005/01/29
- Re: `y-or-n-p' does not wait for input - assumes `n', Luc Teirlinck, 2005/01/26