# HG changeset patch # User Richard M. Stallman # Date 981822824 0 # Node ID e536d2c83d02a5af6a760c15383b0d076a25ab42 # Parent b6487bb8750c13b47e55d428a8364f7ecb3a6734 (repeat): Don't let execute-kbd-macro alter real-last-command. diff -r b6487bb8750c -r e536d2c83d02 lisp/repeat.el --- a/lisp/repeat.el Sat Feb 10 16:30:42 2001 +0000 +++ b/lisp/repeat.el Sat Feb 10 16:33:44 2001 +0000 @@ -280,7 +280,10 @@ (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