diff options
author | Karl Heuer <kwzh@gnu.org> | 1999-03-30 18:02:13 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1999-03-30 18:02:13 +0000 |
commit | 80184dac072806f282c0bae51bd0b2569083cdda (patch) | |
tree | 84dd71cdbcba4720a945705bdc8310ba37485344 /src/macros.c | |
parent | 5f625d0c092478148b779751bf42db35482e0800 (diff) | |
download | emacs-80184dac072806f282c0bae51bd0b2569083cdda.tar.gz |
(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.
Diffstat (limited to 'src/macros.c')
-rw-r--r-- | src/macros.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/macros.c b/src/macros.c index 0d86d9cf54f..a0212e1044a 100644 --- a/src/macros.c +++ b/src/macros.c @@ -211,6 +211,8 @@ defining others, use \\[name-last-kbd-macro].") /* 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 @@ pop_kbd_macro (info) 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 @@ COUNT is a repeat count, or nil for once, or 0 for infinite loop.") 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); |