* kmacro.el (kmacro-call-macro): Fix bug#14135.

This commit is contained in:
Leo Liu 2013-04-05 16:38:06 +08:00
parent 0ccecc08cd
commit fc164b0c33
2 changed files with 11 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2013-04-05 Leo Liu <sdl.web@gmail.com>
* kmacro.el (kmacro-call-macro): Fix bug#14135.
2013-04-05 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-units.el (calc-convert-units): Rewrite conditional.

View file

@ -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)))))