From: Martin Rudalics Date: Wed, 18 Jul 2007 08:46:42 +0000 (+0000) Subject: (kmacro-end-macro): When ignoring empty macro X-Git-Tag: emacs-pretest-23.0.90~11859 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59f63e9aa5e8dd069f5fa60e04c540af1f6f50a8;p=emacs.git (kmacro-end-macro): When ignoring empty macro avoid incorrect kmacro-ring-empty-p messages. --- diff --git a/lisp/kmacro.el b/lisp/kmacro.el index bfc0edba2c1..8d162e73da6 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