bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6256: 24.0.50; read-event in `repeat' command


From: Drew Adams
Subject: bug#6256: 24.0.50; read-event in `repeat' command
Date: Mon, 24 May 2010 16:05:27 -0700

> > Is changing `read-event' to `read-char-exclusive' the proper 
> > fix for this bug? It works for me.  If it is not the right fix,
> > then what is?
> > 
> > If it is important for some use reason to keep `read-event', 
> > and no fix is found that would DTRT to distinguish real user
> > events from events such as `switch-frame', then could we at
> > least use `(funcall repeat-read-function)' instead of
> > `(read-event)', so that code that wants to be sensitive to
> > only char events can bind `repeat-read-function' to 
> > `read-char-exclusive' around the call to `repeat'?
> > 
> > The default value of such a var could be `read-event', if 
> > that's deemed the best default, but we at least need some
> > way to make `repeat' ignore non-char events
> > (if we cannot find a way to make it ignore non-user events).
> 
> Actually, I think that using `read-char-exclusive' is the 
> right fix. If the
> action were initiated by a mouse event it is unlikely that 
> the next event would
> be the same mouse event, so repetition would not occur anyway.
> 
> Could you please make this fix: replace the unique occurrence 
> of `read-event' by `read-char-exclusive' in `repeat'. Thx.

I take it back.  `read-char-exclusive' is not the right fix, because not all
keyboard events are character events.  Hitting the key `left', for instance,
does not work.

And in fact, I do not seem to be able to reproduce the problem anymore in Emacs
23. (It does occur in Emacs 22.3, however.)  Sorry for the noise.

So I guess this bug could be closed.  But I still wonder if the code shouldn't
be tweaked somehow to read an event but ignore non-user (or at least
non-keyboard) events.  I don't know how to do that.

Before closing, it would be great if someone knowledgable would reply with some
info about the question.  Thx.






reply via email to

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