From: Leo Liu Date: Fri, 5 Apr 2013 08:38:06 +0000 (+0800) Subject: * kmacro.el (kmacro-call-macro): Fix bug#14135. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~526^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fc164b0c33ea4d65e5d1da2c3925569b032b398d;p=emacs.git * kmacro.el (kmacro-call-macro): Fix bug#14135. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 015ce23ef8e..6da3acf9dda 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-04-05 Leo Liu + + * kmacro.el (kmacro-call-macro): Fix bug#14135. + 2013-04-05 Jay Belanger * calc/calc-units.el (calc-convert-units): Rewrite conditional. diff --git a/lisp/kmacro.el b/lisp/kmacro.el index c08f49df0a7..d6de2feb3fc 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -631,11 +631,11 @@ others, use \\[kmacro-name-last-macro]." (> (length (this-single-command-keys)) 1)) ;; Used when we're in the process of repeating. (eq no-repeat 'repeating)) - last-input-event)) - (last-kbd-macro (or macro last-kbd-macro))) + last-input-event))) (if end-macro - (kmacro-end-macro arg) - (call-last-kbd-macro arg #'kmacro-loop-setup-function)) + (kmacro-end-macro arg) ; modifies last-kbd-macro + (let ((last-kbd-macro (or macro last-kbd-macro))) + (call-last-kbd-macro arg #'kmacro-loop-setup-function))) (when (consp arg) (setq arg (car arg))) (when (and (or (null arg) (> arg 0)) @@ -658,7 +658,9 @@ others, use \\[kmacro-name-last-macro]." (define-key map (vector repeat-key) `(lambda () (interactive) (kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg) - 'repeating nil ,last-kbd-macro))) + 'repeating nil ,(if end-macro + last-kbd-macro + (or macro last-kbd-macro))))) map)))))