GNU bug report logs -
#6256
24.0.50; read-event in `repeat' command
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Mon, 24 May 2010 15:13:02 UTC
Severity: normal
Found in version 24.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> >> You could also try
> >> (while (let ((evt (read-event)))
> >> (message "EVT: %S, R-R-CHAR: %S" evt repeat-repeat-char)
> >> (and (equal (event-basic-type evt)
> >> (event-basic-type repeat-repeat-char))
> >> (equal (event-modifiers evt)
> >> (event-modifiers repeat-repeat-char))))
> >> (repeat repeat-arg))
>
> Or adding the suggested `message' calls before/after read-key or
> elsewhere to try and see what are the values of repeat-repeat-char at
> various places rather than try and guess them.
OK, I retested, and I no longer see the problem. In the last few days I've
changed some of the code I use, but not in any way that I would expect would
make a difference here (i.e., in presumably unrelated areas).
So I don't understand it. But the good news is that your code works for me now.
If I had to guess, I'd guess that the problem was that I was loading the new
code but then when I used the mouse-wheel commands the library they were defined
in invoked `(require repeat.el)', and that redefined the function `repeat' as it
was originally.
That would be my guess. But I could have sworn that I used `C-M-x' several
times during testing (e.g. after adding a call to `message'), so I should have
at some point tested with the new definition. When I tested before, it
systematically did not work. Anyway, it works now. Sorry for not testing
correctly the first time.
I checked also that it works with modifiers (e.g. C-S-wheel-up).
(I assume that you tested that also on GNU.)
So I'm OK with your fix. The only disadvantage wrt my fix, for my use (on
Windows), is that it will not work for Emacs prior to 23.2, when `read-key' was
introduced. (I know you don't care about that.)
Thx.
What changes will I need to make to my code, if any, after you move to the new
implementation that uses `set-temporary-overlay-map'? I think you said none,
since I changed the let bindings to setq. Can you confirm or let me know what
will need to change?
This bug report was last modified 14 years and 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.