diff options
| author | Richard M. Stallman | 1996-11-11 20:33:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-11-11 20:33:21 +0000 |
| commit | 4315204e5b48828e7493b131c0141a41ae06a819 (patch) | |
| tree | e2b4b074b0d421607657dfbacbdc01ec7dbcd97f /src | |
| parent | 2d8e7e1f13d0f5deb71bbb421a7b20de53b31db2 (diff) | |
| download | emacs-4315204e5b48828e7493b131c0141a41ae06a819.tar.gz emacs-4315204e5b48828e7493b131c0141a41ae06a819.zip | |
(Fcall_last_kbd_macro): Set this_command from last_command
on entry and again on exit.
Diffstat (limited to 'src')
| -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].") | |||
| 204 | (prefix) | 204 | (prefix) |
| 205 | Lisp_Object prefix; | 205 | Lisp_Object prefix; |
| 206 | { | 206 | { |
| 207 | /* Don't interfere with recognition of the previous command | ||
| 208 | from before this macro started. */ | ||
| 209 | this_command = current_kboard->Vlast_command; | ||
| 210 | |||
| 207 | if (! NILP (current_kboard->defining_kbd_macro)) | 211 | if (! NILP (current_kboard->defining_kbd_macro)) |
| 208 | error ("Can't execute anonymous macro while defining one"); | 212 | error ("Can't execute anonymous macro while defining one"); |
| 209 | else if (NILP (current_kboard->Vlast_kbd_macro)) | 213 | else if (NILP (current_kboard->Vlast_kbd_macro)) |
| 210 | error ("No kbd macro has been defined"); | 214 | error ("No kbd macro has been defined"); |
| 211 | else | 215 | else |
| 212 | Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, prefix); | 216 | Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, prefix); |
| 217 | |||
| 218 | /* command_loop_1 sets this to nil before it returns; | ||
| 219 | get back the last command within the macro | ||
| 220 | so that it can be last, again, after we return. */ | ||
| 221 | this_command = current_kboard->Vlast_command; | ||
| 222 | |||
| 213 | return Qnil; | 223 | return Qnil; |
| 214 | } | 224 | } |
| 215 | 225 | ||