From bea4b9cef458b944a6cb7e76e75c14bb5f6d682b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 10 Feb 2001 16:33:44 +0000 Subject: [PATCH] (repeat): Don't let execute-kbd-macro alter real-last-command. --- lisp/repeat.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.39.5