# HG changeset patch # User Karl Heuer # Date 922816933 0 # Node ID 14cc75ebfd7bf5671b37c9fa8ee8d3f3f6b0b9a8 # Parent 2986e6d0e92751b1b3d8401b3d4d94dbee7b74fe (Fexecute_kbd_macro): Save real_this_command. (pop_kbd_macro): Restore the saved real_this_command. (Fcall_last_kbd_macro): Set real_this_command to the macro. diff -r 2986e6d0e927 -r 14cc75ebfd7b src/macros.c --- a/src/macros.c Tue Mar 30 18:00:49 1999 +0000 +++ b/src/macros.c Tue Mar 30 18:02:13 1999 +0000 @@ -211,6 +211,8 @@ /* Don't interfere with recognition of the previous command from before this macro started. */ Vthis_command = current_kboard->Vlast_command; + /* C-x z after the macro should repeat the macro. */ + real_this_command = current_kboard->Vlast_kbd_macro; if (! NILP (current_kboard->defining_kbd_macro)) error ("Can't execute anonymous macro while defining one"); @@ -235,9 +237,10 @@ Lisp_Object info; { Lisp_Object tem; - Vexecuting_macro = Fcar (info); - tem = Fcdr (info); - executing_macro_index = XINT (tem); + Vexecuting_macro = XCAR (info); + tem = XCDR (info); + executing_macro_index = XINT (XCAR (tem)); + real_this_command = XCDR (tem); return Qnil; } @@ -267,8 +270,9 @@ if (!STRINGP (final) && !VECTORP (final)) error ("Keyboard macros must be strings or vectors"); - XSETFASTINT (tem, executing_macro_index); - tem = Fcons (Vexecuting_macro, tem); + tem = Fcons (Vexecuting_macro, + Fcons (make_number (executing_macro_index), + real_this_command)); record_unwind_protect (pop_kbd_macro, tem); GCPRO1 (final);