Skip to content

Commit

Permalink
* lisp/repeat.el (repeat-echo-message): Bind message-log-max to nil.
Browse files Browse the repository at this point in the history
Don't insert messages about repeatable keys in the *Messages* buffer.
  • Loading branch information
link0ff committed Nov 15, 2021
1 parent fe2ac7c commit b418aad
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions lisp/repeat.el
Expand Up @@ -481,19 +481,20 @@ See `describe-repeat-maps' for a list of all repeatable commands."

(defun repeat-echo-message (keymap)
"Display available repeating keys in the echo area."
(if keymap
(let ((message (repeat-echo-message-string keymap)))
(if (current-message)
(message "%s [%s]" (current-message) message)
(message "%s" message)))
(let ((message (current-message)))
(when message
(cond
((string-prefix-p "Repeat with " message)
(message nil))
((string-search " [Repeat with " message)
(message "%s" (replace-regexp-in-string
" \\[Repeat with .*\\'" "" message))))))))
(let ((message-log-max nil))
(if keymap
(let ((message (repeat-echo-message-string keymap)))
(if (current-message)
(message "%s [%s]" (current-message) message)
(message "%s" message)))
(let ((message (current-message)))
(when message
(cond
((string-prefix-p "Repeat with " message)
(message nil))
((string-search " [Repeat with " message)
(message "%s" (replace-regexp-in-string
" \\[Repeat with .*\\'" "" message)))))))))

(defvar repeat-echo-mode-line-string
(propertize "[Repeating...] " 'face 'mode-line-emphasis)
Expand Down

0 comments on commit b418aad

Please sign in to comment.