Commit e9691cca authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(kmacro-end-macro): Isearch may store this command

into the macro -- so ignore it when executing keyboard macro.
parent c33d06b0
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment