summaryrefslogtreecommitdiff
path: root/src/callint.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2003-08-29 16:15:31 +0000
committerRichard M. Stallman <rms@gnu.org>2003-08-29 16:15:31 +0000
commit0605dd791e373e37c2fa3a83913807ba7eadb9f9 (patch)
treebd8a7a4c9e6999529ff6b42bbb82c411f84c89ca /src/callint.c
parentf8f096e9beb4458f7c1c5fe37567de30ac4fcc26 (diff)
downloademacs-0605dd791e373e37c2fa3a83913807ba7eadb9f9.tar.gz
(Fcall_interactively): Save and restore Vthis_command, Vthis_original_command,
real_this_command, and current_kboard->Vlast_command.
Diffstat (limited to 'src/callint.c')
-rw-r--r--src/callint.c20
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;
Lisp_Object Vcommand_history;
extern Lisp_Object Vhistory_length;
+extern Lisp_Object Vthis_original_command, real_this_command;
Lisp_Object Vcommand_debug_status, Qcommand_debug_status;
Lisp_Object Qenable_recursive_minibuffers;
@@ -291,6 +292,14 @@ supply if the command inquires which events were used to invoke it. */)
int key_count;
int record_then_fail = 0;
+ Lisp_Object save_this_command, save_last_command;
+ Lisp_Object save_this_original_command, save_real_this_command;
+
+ save_this_command = Vthis_command;
+ save_this_original_command = Vthis_original_command;
+ save_real_this_command = real_this_command;
+ save_last_command = current_kboard->Vlast_command;
+
if (NILP (keys))
keys = this_command_keys, key_count = this_command_key_count;
else
@@ -395,6 +404,12 @@ supply if the command inquires which events were used to invoke it. */)
XSETCDR (teml, Qnil);
}
}
+
+ Vthis_command = save_this_command;
+ Vthis_original_command = save_this_original_command;
+ real_this_command= save_real_this_command;
+ current_kboard->Vlast_command = save_last_command;
+
single_kboard_state ();
return apply1 (function, specs);
}
@@ -841,6 +856,11 @@ supply if the command inquires which events were used to invoke it. */)
if (record_then_fail)
Fbarf_if_buffer_read_only ();
+ Vthis_command = save_this_command;
+ Vthis_original_command = save_this_original_command;
+ real_this_command= save_real_this_command;
+ current_kboard->Vlast_command = save_last_command;
+
single_kboard_state ();
{