changeset 47361:5e3418a37a64

(kmacro-call-macro): Deal with a non-numeric prefix arg.
author Miles Bader <miles@gnu.org>
date Tue, 10 Sep 2002 01:23:22 +0000
parents c17030759a04
children e1687eeb0232
files lisp/kmacro.el
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/kmacro.el	Mon Sep 09 23:55:56 2002 +0000
+++ b/lisp/kmacro.el	Tue Sep 10 01:23:22 2002 +0000
@@ -583,9 +583,13 @@
     (if end-macro
 	(kmacro-end-macro arg)
       (call-last-kbd-macro arg #'kmacro-loop-setup-function))
+    (when (consp arg)
+      (setq arg (car arg)))
     (when (and (or (null arg) (> arg 0))
 	       (setq repeat-key
-		     (if (eq kmacro-call-repeat-key t) repeat-key kmacro-call-repeat-key)))
+		     (if (eq kmacro-call-repeat-key t)
+			 repeat-key
+		       kmacro-call-repeat-key)))
       (setq repeat-key-str (format-kbd-macro (vector repeat-key) nil))
       (while repeat-key
 	(message "Repeat macro %swith `%s'..." 
@@ -596,7 +600,8 @@
 	(if (equal repeat-key (read-event))
 	    (progn
 	      (clear-this-command-keys t)
-	      (call-last-kbd-macro (and kmacro-call-repeat-with-arg arg) #'kmacro-loop-setup-function)
+	      (call-last-kbd-macro (and kmacro-call-repeat-with-arg arg)
+				   #'kmacro-loop-setup-function)
 	      (setq last-input-event nil))
 	  (setq repeat-key nil)))
       (when last-input-event