From 46ff443dc0657105213354be12f2d3b97a2538b2 Mon Sep 17 00:00:00 2001 From: Gabriel do Nascimento Ribeiro Date: Tue, 24 Aug 2021 11:23:49 -0300 Subject: [PATCH] Handle nil messages in repeat-echo-message. * lisp/repeat.el (repeat-echo-message): Handle cases where 'current-message' is nil (bug#50176). --- lisp/repeat.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/repeat.el b/lisp/repeat.el index 89488ddc98f..6c3ffec18fc 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -474,8 +474,9 @@ When Repeat mode is enabled, and the command symbol has the property named (if (current-message) (message "%s [%s]" (current-message) mess) (message mess))) - (when (string-search "Repeat with " (current-message)) - (message nil)))) + (and (current-message) + (string-search "Repeat with " (current-message)) + (message nil)))) (defvar repeat-echo-mode-line-string (propertize "[Repeating...] " 'face 'mode-line-emphasis) -- 2.39.2