diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-11-11 20:33:21 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-11-11 20:33:21 +0000 |
commit | 4a42cf2cf99f39f4c9f3a8dd469f6ca55021d89c (patch) | |
tree | c7f6166dced36f1d7d60643e10f634b28fd7cf11 /src/macros.c | |
parent | 1772fbbf396170453b33e9922bc2147100ca7a5e (diff) | |
download | emacs-4a42cf2cf99f39f4c9f3a8dd469f6ca55021d89c.tar.gz |
(Fcall_last_kbd_macro): Set this_command from last_command
on entry and again on exit.
Diffstat (limited to 'src/macros.c')
-rw-r--r-- | src/macros.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/macros.c b/src/macros.c index 30327503ebb..9054fb5bfea 100644 --- a/src/macros.c +++ b/src/macros.c @@ -204,12 +204,22 @@ defining others, use \\[name-last-kbd-macro].") (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; } |