]> git.eshelyaron.com Git - emacs.git/commitdiff
(kmacro-end-macro): When ignoring empty macro
authorMartin Rudalics <rudalics@gmx.at>
Wed, 18 Jul 2007 08:46:42 +0000 (08:46 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Wed, 18 Jul 2007 08:46:42 +0000 (08:46 +0000)
avoid incorrect kmacro-ring-empty-p messages.

lisp/kmacro.el

index bfc0edba2c1e6e2f1fe983da8bac3510f168c5b8..8d162e73da6ea78a66096af815bf6285bb6ffb8f 100644 (file)
@@ -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