# HG changeset patch # User Stefan Monnier # Date 1284229425 -7200 # Node ID b4971a8966f03e5be7ce93d01694ce4fb8186170 # Parent 05bd64a0d7473dcbccaf8b4a838f1406ad716554 * repeat.el (repeat): Allow repeating when the last event is a click. Suggested by Drew Adams (bug#6256). diff -r 05bd64a0d747 -r b4971a8966f0 lisp/ChangeLog --- a/lisp/ChangeLog Sat Sep 11 15:25:48 2010 +0200 +++ b/lisp/ChangeLog Sat Sep 11 20:23:45 2010 +0200 @@ -1,3 +1,8 @@ +2010-09-11 Stefan Monnier + + * repeat.el (repeat): Allow repeating when the last event is a click. + Suggested by Drew Adams (bug#6256). + 2010-09-11 Sascha Wilde * vc/vc-hg.el (vc-hg-state,vc-hg-working-revision): diff -r 05bd64a0d747 -r b4971a8966f0 lisp/repeat.el --- a/lisp/repeat.el Sat Sep 11 15:25:48 2010 +0200 +++ b/lisp/repeat.el Sat Sep 11 20:23:45 2010 +0200 @@ -335,7 +335,12 @@ (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))