summaryrefslogtreecommitdiff
path: root/lisp/repeat.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-09-11 20:23:45 +0200
committerStefan Monnier <monnier@iro.umontreal.ca>2010-09-11 20:23:45 +0200
commitdba28758ab532268947bb9adbb01a22e025898db (patch)
tree5acb1944c2a5d909afec211263721ca34a3a3d68 /lisp/repeat.el
parent681b88dd81e6cfd792dcf80404d7c51381a59ff1 (diff)
downloademacs-dba28758ab532268947bb9adbb01a22e025898db.tar.gz
* repeat.el (repeat): Allow repeating when the last event is a click.
Suggested by Drew Adams (bug#6256).
Diffstat (limited to 'lisp/repeat.el')
-rw-r--r--lisp/repeat.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/repeat.el b/lisp/repeat.el
index edebbe24a84..9abe15c7253 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -335,7 +335,12 @@ recently executed command not bound to an input event\"."
(setq real-last-command 'repeat)
(setq repeat-undo-count 1)
(unwind-protect
- (while (eq (read-event) repeat-repeat-char)
+ (while (let ((evt (read-event))) ;FIXME: read-key maybe?
+ ;; For clicks, we need to strip the meta-data to
+ ;; check the underlying event name.
+ (eq (or (car-safe evt) evt)
+ (or (car-safe repeat-repeat-char)
+ repeat-repeat-char)))
(repeat repeat-arg))
;; Make sure `repeat-undo-count' is reset.
(setq repeat-undo-count nil))