changeset 63147:9bde03db5726

* composite.c (compose_chars_in_text): * eval.c (do_autoload): * macmenu.c (set_frame_menubar): * process.c (read_process_output, exec_sentinel): * xmenu.c (set_frame_menubar): * xdisp.c (prepare_menu_bars, update_menu_bar, update_tool_bar): * w32menu.c (set_frame_menubar): Use record_unwind_save_match_data. Rename restore_match_data to restore_search_regs.
author Kim F. Storm <storm@cua.dk>
date Wed, 08 Jun 2005 22:33:36 +0000
parents 7dced3c64549
children c6a012971aeb
files src/composite.c src/eval.c src/macmenu.c src/process.c src/w32menu.c src/xdisp.c src/xmenu.c
diffstat 7 files changed, 22 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/composite.c	Wed Jun 08 22:32:33 2005 +0000
+++ b/src/composite.c	Wed Jun 08 22:33:36 2005 +0000
@@ -628,7 +628,7 @@
     }
 
   /* Preserve the match data.  */
-  record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
+  record_unwind_save_match_data ();
 
   /* If none of ASCII characters have composition functions, we can
      skip them quickly.  */
--- a/src/eval.c	Wed Jun 08 22:32:33 2005 +0000
+++ b/src/eval.c	Wed Jun 08 22:33:36 2005 +0000
@@ -1971,7 +1971,7 @@
   GCPRO3 (fun, funname, fundef);
 
   /* Preserve the match data.  */
-  record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
+  record_unwind_save_match_data ();
 
   /* Value saved here is to be restored into Vautoload_queue.  */
   record_unwind_protect (un_autoload, Vautoload_queue);
--- a/src/macmenu.c	Wed Jun 08 22:32:33 2005 +0000
+++ b/src/macmenu.c	Wed Jun 08 22:33:36 2005 +0000
@@ -1406,7 +1406,7 @@
   EventTypeSpec typesList[] = { { kEventClassKeyboard, kEventRawKeyDown } };
   int i = MIN_MENU_ID;
   MenuHandle menu = menu_handle ? menu_handle : GetMenuHandle (i);
-    
+
   while (menu != NULL)
     {
       InstallMenuEventHandler (menu, handler, GetEventTypeCount (typesList),
@@ -1475,7 +1475,7 @@
 	 because it is not reentrant.  */
       specbind (Qdebug_on_next_call, Qnil);
 
-      record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
+      record_unwind_save_match_data ();
       if (NILP (Voverriding_local_map_menu_flag))
 	{
 	  specbind (Qoverriding_terminal_local_map, Qnil);
@@ -1676,7 +1676,7 @@
 {
   struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg));
   struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg));
-  
+
   FRAME_PTR f = p1->pointer;
   MenuHandle *menu = p2->pointer;
 
@@ -1955,7 +1955,7 @@
 
   /* Add event handler so we can detect C-g. */
   install_menu_quit_handler (menu);
-  
+
   /* Display the menu.  */
   menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0);
   menu_item_selection = LoWord (menu_item_choice);
--- a/src/process.c	Wed Jun 08 22:32:33 2005 +0000
+++ b/src/process.c	Wed Jun 08 22:33:36 2005 +0000
@@ -4887,10 +4887,10 @@
 	{
 	  Lisp_Object tem;
 	  /* Don't clobber the CURRENT match data, either!  */
-	  tem = Fmatch_data (Qnil, Qnil);
-	  restore_match_data ();
-	  record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
-	  Fset_match_data (tem);
+	  tem = Fmatch_data (Qnil, Qnil, Qnil);
+	  restore_search_regs ();
+	  record_unwind_save_match_data ();
+	  Fset_match_data (tem, Qt);
 	}
 
       /* For speed, if a search happens within this code,
@@ -4944,7 +4944,7 @@
 				   read_process_output_error_handler);
 
       /* If we saved the match data nonrecursively, restore it now.  */
-      restore_match_data ();
+      restore_search_regs ();
       running_asynch_code = outer_running_asynch_code;
 
       /* Handling the process output should not deactivate the mark.  */
@@ -6348,10 +6348,10 @@
   if (outer_running_asynch_code)
     {
       Lisp_Object tem;
-      tem = Fmatch_data (Qnil, Qnil);
-      restore_match_data ();
-      record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
-      Fset_match_data (tem);
+      tem = Fmatch_data (Qnil, Qnil, Qnil);
+      restore_search_regs ();
+      record_unwind_save_match_data ();
+      Fset_match_data (tem, Qt);
     }
 
   /* For speed, if a search happens within this code,
@@ -6365,7 +6365,7 @@
 			     exec_sentinel_error_handler);
 
   /* If we saved the match data nonrecursively, restore it now.  */
-  restore_match_data ();
+  restore_search_regs ();
   running_asynch_code = outer_running_asynch_code;
 
   Vdeactivate_mark = odeactivate;
--- a/src/w32menu.c	Wed Jun 08 22:32:33 2005 +0000
+++ b/src/w32menu.c	Wed Jun 08 22:33:36 2005 +0000
@@ -1443,7 +1443,8 @@
 	 because it is not reentrant.  */
       specbind (Qdebug_on_next_call, Qnil);
 
-      record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
+      record_unwind_save_match_data ();
+
       if (NILP (Voverriding_local_map_menu_flag))
 	{
 	  specbind (Qoverriding_terminal_local_map, Qnil);
--- a/src/xdisp.c	Wed Jun 08 22:32:33 2005 +0000
+++ b/src/xdisp.c	Wed Jun 08 22:33:36 2005 +0000
@@ -8489,7 +8489,7 @@
       Lisp_Object tail, frame;
       int count = SPECPDL_INDEX ();
 
-      record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
+      record_unwind_save_match_data ();
 
       FOR_EACH_FRAME (tail, frame)
 	{
@@ -8612,7 +8612,7 @@
 
 	  set_buffer_internal_1 (XBUFFER (w->buffer));
 	  if (save_match_data)
-	    record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
+	    record_unwind_save_match_data ();
 	  if (NILP (Voverriding_local_map_menu_flag))
 	    {
 	      specbind (Qoverriding_terminal_local_map, Qnil);
@@ -8803,7 +8803,7 @@
 
 	  /* Save match data, if we must.  */
 	  if (save_match_data)
-	    record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
+	    record_unwind_save_match_data ();
 
 	  /* Make sure that we don't accidentally use bogus keymaps.  */
 	  if (NILP (Voverriding_local_map_menu_flag))
--- a/src/xmenu.c	Wed Jun 08 22:32:33 2005 +0000
+++ b/src/xmenu.c	Wed Jun 08 22:33:36 2005 +0000
@@ -2030,7 +2030,7 @@
 	 because it is not reentrant.  */
       specbind (Qdebug_on_next_call, Qnil);
 
-      record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil));
+      record_unwind_save_match_data ();
       record_unwind_protect (unuse_menu_items, Qnil);
       if (NILP (Voverriding_local_map_menu_flag))
 	{