]> git.eshelyaron.com Git - emacs.git/commitdiff
Make winner key sequences repeatable in repeat-mode
authorDamien Cassou <damien@cassou.me>
Wed, 26 Oct 2022 14:53:23 +0000 (16:53 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sun, 30 Oct 2022 12:19:05 +0000 (13:19 +0100)
* lisp/winner.el (winner-repeat-map): New variable.
(winner-undo, winner-redo): Put 'repeat-map' property with
'winner-repeat-map'.  (Bug#58799)

lisp/winner.el

index 174b698e7b54780b6d1216cecf669f3b63c82238..c8354b18bece70f117f78ce20e6aae93714b3ce8 100644 (file)
@@ -328,6 +328,14 @@ You may want to include buffer names such as *Help*, *Apropos*,
     map)
   "Keymap for Winner mode.")
 
+(defvar-keymap winner-repeat-map
+  :doc "Keymap to repeat winner key sequences.  Used in `repeat-mode'."
+  "<left>"  #'winner-undo
+  "<right>" #'winner-redo)
+
+(put #'winner-undo 'repeat-map 'winner-repeat-map)
+(put #'winner-redo 'repeat-map 'winner-repeat-map)
+
 \f
 ;;;###autoload
 (define-minor-mode winner-mode