aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2002-09-10 01:23:22 +0000
committerMiles Bader2002-09-10 01:23:22 +0000
commit1698f7888a5998d4fd6f36e722be81d5d246ba4e (patch)
treec4e8bde616f2a369941940bd170b5fca1d82ff14
parent8e74e352d5993e4045a8a33fd4efe976770df005 (diff)
downloademacs-1698f7888a5998d4fd6f36e722be81d5d246ba4e.tar.gz
emacs-1698f7888a5998d4fd6f36e722be81d5d246ba4e.zip
(kmacro-call-macro): Deal with a non-numeric prefix arg.
-rw-r--r--lisp/kmacro.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index e4388964423..71d49815954 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -583,9 +583,13 @@ others, use M-x name-last-kbd-macro."
583 (if end-macro 583 (if end-macro
584 (kmacro-end-macro arg) 584 (kmacro-end-macro arg)
585 (call-last-kbd-macro arg #'kmacro-loop-setup-function)) 585 (call-last-kbd-macro arg #'kmacro-loop-setup-function))
586 (when (consp arg)
587 (setq arg (car arg)))
586 (when (and (or (null arg) (> arg 0)) 588 (when (and (or (null arg) (> arg 0))
587 (setq repeat-key 589 (setq repeat-key
588 (if (eq kmacro-call-repeat-key t) repeat-key kmacro-call-repeat-key))) 590 (if (eq kmacro-call-repeat-key t)
591 repeat-key
592 kmacro-call-repeat-key)))
589 (setq repeat-key-str (format-kbd-macro (vector repeat-key) nil)) 593 (setq repeat-key-str (format-kbd-macro (vector repeat-key) nil))
590 (while repeat-key 594 (while repeat-key
591 (message "Repeat macro %swith `%s'..." 595 (message "Repeat macro %swith `%s'..."
@@ -596,7 +600,8 @@ others, use M-x name-last-kbd-macro."
596 (if (equal repeat-key (read-event)) 600 (if (equal repeat-key (read-event))
597 (progn 601 (progn
598 (clear-this-command-keys t) 602 (clear-this-command-keys t)
599 (call-last-kbd-macro (and kmacro-call-repeat-with-arg arg) #'kmacro-loop-setup-function) 603 (call-last-kbd-macro (and kmacro-call-repeat-with-arg arg)
604 #'kmacro-loop-setup-function)
600 (setq last-input-event nil)) 605 (setq last-input-event nil))
601 (setq repeat-key nil))) 606 (setq repeat-key nil)))
602 (when last-input-event 607 (when last-input-event