aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2025-07-23 20:56:05 +0300
committerJuri Linkov2025-07-23 20:56:05 +0300
commit128e8311be5b2c65a106fe4ee96056751d600b0d (patch)
tree336ca163d106a4a770f92421110a5ce862efda9d
parentc142f0d246095b75bdb3a7d8bc3079a55e48f2b3 (diff)
downloademacs-128e8311be5b2c65a106fe4ee96056751d600b0d.tar.gz
emacs-128e8311be5b2c65a106fe4ee96056751d600b0d.zip
* lisp/repeat.el (repeat-mode): Use 'called-interactively-p'.
This logic is copied from 'define-minor-mode' that displays a message about mode activation only when called interactively (bug#79081).
-rw-r--r--lisp/repeat.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 93c4a397335..e472f48e6d1 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -448,15 +448,18 @@ See `describe-repeat-maps' for a list of all repeatable commands."
448 (when repeat-keep-prefix 448 (when repeat-keep-prefix
449 (add-hook 'pre-command-hook 'repeat-pre-hook)) 449 (add-hook 'pre-command-hook 'repeat-pre-hook))
450 (add-hook 'post-command-hook 'repeat-post-hook) 450 (add-hook 'post-command-hook 'repeat-post-hook)
451 (let* ((keymaps nil) 451 (when (called-interactively-p 'any)
452 (commands (all-completions 452 (let* ((keymaps nil)
453 "" obarray (lambda (s) 453 (commands (all-completions
454 (and (commandp s) 454 "" obarray
455 (get s 'repeat-map) 455 (lambda (s)
456 (push (get s 'repeat-map) keymaps)))))) 456 (and (commandp s)
457 (message "Repeat mode is enabled for %d commands and %d keymaps; see `describe-repeat-maps'" 457 (get s 'repeat-map)
458 (length commands) 458 (push (get s 'repeat-map) keymaps))))))
459 (length (delete-dups keymaps)))))) 459 (message "Repeat mode is enabled for %d commands and %d keymaps; \
460see `describe-repeat-maps'"
461 (length commands)
462 (length (delete-dups keymaps)))))))
460 463
461(defun repeat--command-property (property) 464(defun repeat--command-property (property)
462 (or (and (symbolp this-command) 465 (or (and (symbolp this-command)