GNU bug report logs -
#46515
Repeat mode
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sun, 14 Feb 2021 18:54:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
>> repeat.el doesn't describe the key binding, but it does say a repeat
>> mode is active. Kmacro is so smart that it aranges for the repeat key to
>> be based on whatever key the command was invoked with.
>
> Unlike `indent-rigidly', `kmacro' message
>
> (Type e to repeat macro)
>
> is displayed on every keypress, so it's a good example.
> Now added in the following patch applied over the previous patch.
Here is another incremental patch that adds more messaging:
[repeat-message-2.patch (text/x-diff, inline)]
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 3c8be63c84..a322afed1d 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -349,7 +349,16 @@ repeat-mode
:global t :group 'convenience
(if (not repeat-mode)
(remove-hook 'post-command-hook 'repeat-post-hook)
- (add-hook 'post-command-hook 'repeat-post-hook)))
+ (add-hook 'post-command-hook 'repeat-post-hook)
+ (let* ((keymaps nil)
+ (commands (all-completions
+ "" obarray (lambda (s)
+ (and (commandp s)
+ (get s 'repeat-map)
+ (push (get s 'repeat-map) keymaps))))))
+ (message "Repeat mode is enabled for %d commands and %d keymaps"
+ (length commands)
+ (length (delete-dups keymaps))))))
(defun repeat-post-hook ()
"Function run after commands to set transient keymap."
@@ -362,7 +371,10 @@ repeat-post-hook
(let ((map (copy-keymap repeat-map)))
(let (keys)
(map-keymap (lambda (key _) (push (key-description (vector key)) keys)) map)
- (message "To repeat type %s" (mapconcat #'identity keys ", ")))
+ (message "To repeat type %s%s"
+ (mapconcat #'identity keys ", ")
+ (when repeat-exit-key
+ (format ", or %s to exit" (key-description repeat-exit-key)))))
(when repeat-exit-key
(define-key map repeat-exit-key 'ignore))
(set-transient-map map))))))
This bug report was last modified 4 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.