From: Richard M. Stallman Date: Sat, 10 Feb 2001 16:33:44 +0000 (+0000) Subject: (repeat): Don't let execute-kbd-macro alter real-last-command. X-Git-Tag: emacs-pretest-21.0.98~53 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bea4b9cef458b944a6cb7e76e75c14bb5f6d682b;p=emacs.git (repeat): Don't let execute-kbd-macro alter real-last-command. --- diff --git a/lisp/repeat.el b/lisp/repeat.el index 523ee3ce964..d11da6aa498 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -280,7 +280,10 @@ can be modified by the global variable `repeat-on-final-keystroke'." (let ((indirect (indirect-function real-last-command))) (if (or (stringp indirect) (vectorp indirect)) - (execute-kbd-macro real-last-command) + ;; Bind real-last-command so that executing the macro + ;; does not alter it. + (let ((real-last-command real-last-command)) + (execute-kbd-macro real-last-command)) (call-interactively real-last-command))))) (when repeat-repeat-char ;; A simple recursion here gets into trouble with max-lisp-eval-depth