diff options
author | Miles Bader <miles@gnu.org> | 2002-09-10 01:23:22 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2002-09-10 01:23:22 +0000 |
commit | 1698f7888a5998d4fd6f36e722be81d5d246ba4e (patch) | |
tree | c4e8bde616f2a369941940bd170b5fca1d82ff14 /lisp/kmacro.el | |
parent | 8e74e352d5993e4045a8a33fd4efe976770df005 (diff) | |
download | emacs-1698f7888a5998d4fd6f36e722be81d5d246ba4e.tar.gz |
(kmacro-call-macro): Deal with a non-numeric prefix arg.
Diffstat (limited to 'lisp/kmacro.el')
-rw-r--r-- | lisp/kmacro.el | 9 |
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." (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 @@ others, use M-x name-last-kbd-macro." (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 |