changeset 52374:1b48f538540b

(Fcall_interactively): Save and restore Vthis_command, Vthis_original_command, real_this_command, and current_kboard->Vlast_command.
author Richard M. Stallman <rms@gnu.org>
date Fri, 29 Aug 2003 16:15:31 +0000
parents ddaae63bd193
children 1360ccf1c443
files src/callint.c
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/callint.c	Fri Aug 29 16:14:26 2003 +0000
+++ b/src/callint.c	Fri Aug 29 16:15:31 2003 +0000
@@ -41,6 +41,7 @@
 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 @@
   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 @@
 		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 @@
   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 ();
 
   {