+ (setq repeat-undo-count 1)
+ (unwind-protect
+ (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))