# HG changeset patch # User Richard M. Stallman # Date 847744401 0 # Node ID 4999fc12564e47d8b585a545c052646163e2d7eb # Parent 55fcbbf28987256b6094f9b758ba94a3d0a94e18 (Fcall_last_kbd_macro): Set this_command from last_command on entry and again on exit. diff -r 55fcbbf28987 -r 4999fc12564e src/macros.c --- a/src/macros.c Mon Nov 11 20:32:48 1996 +0000 +++ b/src/macros.c Mon Nov 11 20:33:21 1996 +0000 @@ -204,12 +204,22 @@ (prefix) Lisp_Object prefix; { + /* Don't interfere with recognition of the previous command + from before this macro started. */ + this_command = current_kboard->Vlast_command; + if (! NILP (current_kboard->defining_kbd_macro)) error ("Can't execute anonymous macro while defining one"); else if (NILP (current_kboard->Vlast_kbd_macro)) error ("No kbd macro has been defined"); else Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, prefix); + + /* command_loop_1 sets this to nil before it returns; + get back the last command within the macro + so that it can be last, again, after we return. */ + this_command = current_kboard->Vlast_command; + return Qnil; }