# HG changeset patch # User Kim F. Storm # Date 1112178310 0 # Node ID 71175894291a2e347709620fb77280406af9a482 # Parent 646401e7ef19a3f947449c532a5d83935e77fe4d (kmacro-end-macro): Isearch may store this command into the macro -- so ignore it when executing keyboard macro. diff -r 646401e7ef19 -r 71175894291a lisp/kmacro.el --- a/lisp/kmacro.el Wed Mar 30 10:24:55 2005 +0000 +++ b/lisp/kmacro.el Wed Mar 30 10:25:10 2005 +0000 @@ -614,10 +614,13 @@ counting the definition just completed as the first repetition. An argument of zero means repeat until error." (interactive "P") - (end-kbd-macro arg #'kmacro-loop-setup-function) - (when (and last-kbd-macro (= (length last-kbd-macro) 0)) - (message "Ignore empty macro") - (kmacro-pop-ring))) + ;; Isearch may push the kmacro-end-macro key sequence onto the macro. + ;; Just ignore it when executing the macro. + (unless executing-kbd-macro + (end-kbd-macro arg #'kmacro-loop-setup-function) + (when (and last-kbd-macro (= (length last-kbd-macro) 0)) + (message "Ignore empty macro") + (kmacro-pop-ring)))) ;;;###autoload