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

From: Robert Pluim <[email-masked]>
Date: Thu, 27 Oct 2022 13:39:37 +0200

>>>>> On Thu, 27 Oct 2022 03:58:38 -0700, Stefan Kangas <[email-masked]> said:

    Stefan> I don't think I see any contradiction, as `keymap-set' requires its
    Stefan> second argument to be `key-valid-p'.  So that last one should just be:

    Stefan>     (keymap-set global-map "<right>" #'ignore)

Now that Iʼve actually run some more tests, I see where the confusion
is coming from. You canʼt actually eval this:

    (defvar-keymap winner-repeat-map
      :doc "Keymap to repeat winner key sequences.  Used in `repeat-mode'."
      [left] #'winner-undo
      [right] #'winner-redo)

or this:

    (defvar-keymap winner-repeat-map
      :doc "Keymap to repeat winner key sequences.  Used in `repeat-mode'."
      <left> #'winner-undo
      <right> #'winner-redo)

(but you can stick them in a .el file)

But you can eval this:

    (defvar-keymap winner-repeat-map
      :doc "Keymap to repeat winner key sequences.  Used in `repeat-mode'."
      "<left>" #'winner-undo
      "<right>" #'winner-redo)

Well, TIL. I donʼt think itʼs going to result in any patches from me
though, unless we want to disallow `[left]' and `[right]' in
`defvar-keymap' :-)

Robert
--