From: Juri Linkov Date: Mon, 3 Oct 2022 19:54:16 +0000 (+0300) Subject: * lisp/repeat.el (repeat-exit-key): Replace type 'key-sequence' with 'key'. X-Git-Tag: emacs-29.0.90~1856^2~50 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b374952b5117990e84a9d51da78ad94b2c82ecbb;p=emacs.git * lisp/repeat.el (repeat-exit-key): Replace type 'key-sequence' with 'key'. (repeat-post-hook, repeat-echo-message-string): Add backward-compatibility code for repeat-exit-key to keep support for 'key-sequence' type (bug#55986). --- diff --git a/lisp/repeat.el b/lisp/repeat.el index df6b8140a69..d773e440670 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -344,7 +344,7 @@ recently executed command not bound to an input event\"." "Key that stops the modal repeating of keys in sequence. For example, you can set it to like `isearch-exit'." :type '(choice (const :tag "No special key to exit repeating sequence" nil) - (key-sequence :tag "Key that exits repeating sequence")) + (key :tag "Kbd keys that exit repeating sequence")) :group 'repeat :version "28.1") @@ -475,7 +475,10 @@ See `describe-repeat-maps' for a list of all repeatable commands." ;; Adding an exit key (when repeat-exit-key - (define-key map repeat-exit-key 'ignore)) + (define-key map (if (key-valid-p repeat-exit-key) + (kbd repeat-exit-key) + repeat-exit-key) + 'ignore)) (when (and repeat-keep-prefix (not prefix-arg)) (setq prefix-arg current-prefix-arg)) @@ -526,7 +529,9 @@ This function can be used to force exit of repetition while it's active." (if repeat-exit-key (substitute-command-keys (format ", or exit with \\`%s'" - (key-description repeat-exit-key))) + (if (key-valid-p repeat-exit-key) + repeat-exit-key + (key-description repeat-exit-key)))) "")))) (defun repeat-echo-message (keymap)