Subject: Re: bug#58799: Make winner key sequences repeatable in repeat-mode

From: Stefan Kangas <[email-masked]>
Date: Wed, 26 Oct 2022 12:52:29 -0700

Damien Cassou <[email-masked]> writes:

> 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'.

There is no need to repeat the same text twice, so you can delete the
first occurrence.

> ---
>  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)

It should be "<right>" and "<left>" here, I think.

> +
> +(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