From b64e39f1b9a418fda213da8781bb37995c796d3c Mon Sep 17 00:00:00 2001 From: JD Smith Date: Sun, 4 Jan 2026 18:56:19 -0500 Subject: [PATCH] repeat: handle non-character keys with hint strings When a repeat hint string exists, the hint is formatted using `read-multiple-choice' formatting. But `rmc--add-key-description' only works on characters, not symbols like 'right or 'left. * lisp/repeat.el (repeat-echo-message-string): check for chars --- lisp/repeat.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/repeat.el b/lisp/repeat.el index 9ac72f50384..1b32558f426 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -591,14 +591,17 @@ This function can be used to force exit of repetition while it's active." (if-let* ((hint (and (symbolp cmd) (get cmd 'repeat-hint))) (last (aref key (1- (length key))))) - ;; Reuse `read-multiple-choice' formatting. - (if (= (length key) 1) + ;; Possibly reuse `read-multiple-choice' formatting. + (if (and (= (length key) 1) (characterp last)) (cdr (rmc--add-key-description (list last hint))) (format "%s (%s)" (propertize (key-description key) 'face 'read-multiple-choice-face) - (cdr (rmc--add-key-description - (list (event-basic-type last) hint))))) + (if (characterp (event-basic-type last)) + (cdr (rmc--add-key-description + (list (event-basic-type last) hint))) + hint))) + ;; No hint (propertize (key-description key) 'face 'read-multiple-choice-face)))) keys ", ")