diff options
author | Kim F. Storm <storm@cua.dk> | 2005-03-30 10:25:10 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2005-03-30 10:25:10 +0000 |
commit | e9691cca876ec0e9c6d96dbf70427e3fd699c090 (patch) | |
tree | b835e9ad200cf48e06bf84f3d65c96829514061b /lisp/kmacro.el | |
parent | c33d06b01ac711cc9608d773c95c89efe89c58f9 (diff) | |
download | emacs-e9691cca876ec0e9c6d96dbf70427e3fd699c090.tar.gz |
(kmacro-end-macro): Isearch may store this command
into the macro -- so ignore it when executing keyboard macro.
Diffstat (limited to 'lisp/kmacro.el')
-rw-r--r-- | lisp/kmacro.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/kmacro.el b/lisp/kmacro.el index c6a97bb3d34..20816fc7fea 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -614,10 +614,13 @@ With numeric arg, repeat macro now that many times, 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 |