summaryrefslogtreecommitdiff
path: root/lisp/kmacro.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/kmacro.el')
-rw-r--r--lisp/kmacro.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index c9c5066f88c..096d35bebbd 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -606,8 +606,11 @@ An argument of zero means repeat until error."
(unless executing-kbd-macro
(end-kbd-macro arg #'kmacro-loop-setup-function)
(when (and last-kbd-macro (= (length last-kbd-macro) 0))
+ (setq last-kbd-macro nil)
(message "Ignore empty macro")
- (kmacro-pop-ring))))
+ ;; Don't call `kmacro-ring-empty-p' to avoid its messages.
+ (while (and (null last-kbd-macro) kmacro-ring)
+ (kmacro-pop-ring1)))))
;;;###autoload