# HG changeset patch # User Kim F. Storm # Date 1118270016 0 # Node ID 9bde03db5726d6259578cb05e01c10fbd1955af3 # Parent 7dced3c645490ffc6d3f3efb639be0af24ffa306 * 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. diff -r 7dced3c64549 -r 9bde03db5726 src/composite.c --- 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. */ diff -r 7dced3c64549 -r 9bde03db5726 src/eval.c --- 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); diff -r 7dced3c64549 -r 9bde03db5726 src/macmenu.c --- 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); diff -r 7dced3c64549 -r 9bde03db5726 src/process.c --- 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; diff -r 7dced3c64549 -r 9bde03db5726 src/w32menu.c --- 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); diff -r 7dced3c64549 -r 9bde03db5726 src/xdisp.c --- 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)) diff -r 7dced3c64549 -r 9bde03db5726 src/xmenu.c --- 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)) {