diff options
| author | Richard M. Stallman | 2003-08-29 16:15:31 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-08-29 16:15:31 +0000 |
| commit | 0605dd791e373e37c2fa3a83913807ba7eadb9f9 (patch) | |
| tree | bd8a7a4c9e6999529ff6b42bbb82c411f84c89ca /src | |
| parent | f8f096e9beb4458f7c1c5fe37567de30ac4fcc26 (diff) | |
| download | emacs-0605dd791e373e37c2fa3a83913807ba7eadb9f9.tar.gz emacs-0605dd791e373e37c2fa3a83913807ba7eadb9f9.zip | |
(Fcall_interactively): Save and restore Vthis_command, Vthis_original_command,
real_this_command, and current_kboard->Vlast_command.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callint.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/callint.c b/src/callint.c index 4edb4201fa4..3b0d315db93 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -41,6 +41,7 @@ Lisp_Object Qcall_interactively; | |||
| 41 | Lisp_Object Vcommand_history; | 41 | Lisp_Object Vcommand_history; |
| 42 | 42 | ||
| 43 | extern Lisp_Object Vhistory_length; | 43 | extern Lisp_Object Vhistory_length; |
| 44 | extern Lisp_Object Vthis_original_command, real_this_command; | ||
| 44 | 45 | ||
| 45 | Lisp_Object Vcommand_debug_status, Qcommand_debug_status; | 46 | Lisp_Object Vcommand_debug_status, Qcommand_debug_status; |
| 46 | Lisp_Object Qenable_recursive_minibuffers; | 47 | Lisp_Object Qenable_recursive_minibuffers; |
| @@ -291,6 +292,14 @@ supply if the command inquires which events were used to invoke it. */) | |||
| 291 | int key_count; | 292 | int key_count; |
| 292 | int record_then_fail = 0; | 293 | int record_then_fail = 0; |
| 293 | 294 | ||
| 295 | Lisp_Object save_this_command, save_last_command; | ||
| 296 | Lisp_Object save_this_original_command, save_real_this_command; | ||
| 297 | |||
| 298 | save_this_command = Vthis_command; | ||
| 299 | save_this_original_command = Vthis_original_command; | ||
| 300 | save_real_this_command = real_this_command; | ||
| 301 | save_last_command = current_kboard->Vlast_command; | ||
| 302 | |||
| 294 | if (NILP (keys)) | 303 | if (NILP (keys)) |
| 295 | keys = this_command_keys, key_count = this_command_key_count; | 304 | keys = this_command_keys, key_count = this_command_key_count; |
| 296 | else | 305 | else |
| @@ -395,6 +404,12 @@ supply if the command inquires which events were used to invoke it. */) | |||
| 395 | XSETCDR (teml, Qnil); | 404 | XSETCDR (teml, Qnil); |
| 396 | } | 405 | } |
| 397 | } | 406 | } |
| 407 | |||
| 408 | Vthis_command = save_this_command; | ||
| 409 | Vthis_original_command = save_this_original_command; | ||
| 410 | real_this_command= save_real_this_command; | ||
| 411 | current_kboard->Vlast_command = save_last_command; | ||
| 412 | |||
| 398 | single_kboard_state (); | 413 | single_kboard_state (); |
| 399 | return apply1 (function, specs); | 414 | return apply1 (function, specs); |
| 400 | } | 415 | } |
| @@ -841,6 +856,11 @@ supply if the command inquires which events were used to invoke it. */) | |||
| 841 | if (record_then_fail) | 856 | if (record_then_fail) |
| 842 | Fbarf_if_buffer_read_only (); | 857 | Fbarf_if_buffer_read_only (); |
| 843 | 858 | ||
| 859 | Vthis_command = save_this_command; | ||
| 860 | Vthis_original_command = save_this_original_command; | ||
| 861 | real_this_command= save_real_this_command; | ||
| 862 | current_kboard->Vlast_command = save_last_command; | ||
| 863 | |||
| 844 | single_kboard_state (); | 864 | single_kboard_state (); |
| 845 | 865 | ||
| 846 | { | 866 | { |