Subject: Make winner key sequences repeatable in repeat-mode

From: Damien Cassou <[email-masked]>
Date: Wed, 26 Oct 2022 17:01:03 +0200

Tags: patch

In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure
 --prefix=/nix/store/1ihp8r45mw29fdipjmqrm2vk0fvwd86x-emacs-28.2
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 --with-cairo --with-native-compilation'

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
>From 2f26bbad08f71cb4332cd60fa5698a8c18b4abd2 Mon Sep 17 00:00:00 2001
From: Damien Cassou <[email-masked]>
Date: Wed, 26 Oct 2022 16:53:23 +0200
Subject: [PATCH] Make winner key sequences repeatable in repeat-mode

* lisp/winner.el (winner-repeat-map): New variable.
(winner-undo): Put 'repeat-map' property with 'winner-repeat-map'.
(winner-redo): Put 'repeat-map' property with 'winner-repeat-map'.
---
 lisp/winner.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/winner.el b/lisp/winner.el
index 174b698e7b..30b0a6ada8 100644
--- a/lisp/winner.el
+++ b/lisp/winner.el
@@ -328,6 +328,14 @@ winner-mode-map
     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)
+
 
 ;;;###autoload
 (define-minor-mode winner-mode
-- 
2.36.2