diff options
author | Kim F. Storm <storm@cua.dk> | 2005-06-08 22:33:36 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2005-06-08 22:33:36 +0000 |
commit | 89f2614d96b5cf84f01c4903652a6a2b5b23d3d3 (patch) | |
tree | 9aed849b4b7e3c1a44ba3bd3b6f09a0c3002c06a | |
parent | 5fe2b5a58dc9d211eb523b11f2731b03b8bd525d (diff) | |
download | emacs-89f2614d96b5cf84f01c4903652a6a2b5b23d3d3.tar.gz |
* 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.
-rw-r--r-- | src/composite.c | 2 | ||||
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/macmenu.c | 8 | ||||
-rw-r--r-- | src/process.c | 20 | ||||
-rw-r--r-- | src/w32menu.c | 3 | ||||
-rw-r--r-- | src/xdisp.c | 6 | ||||
-rw-r--r-- | src/xmenu.c | 2 |
7 files changed, 22 insertions, 21 deletions
diff --git a/src/composite.c b/src/composite.c index f8e655a3685..ff2eed925d1 100644 --- a/src/composite.c +++ b/src/composite.c @@ -628,7 +628,7 @@ compose_chars_in_text (start, end, string) } /* 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 --git a/src/eval.c b/src/eval.c index 0eb1482ee0b..46affcac418 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1971,7 +1971,7 @@ do_autoload (fundef, funname) 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 --git a/src/macmenu.c b/src/macmenu.c index 77c66470c09..ee83a5f609f 100644 --- a/src/macmenu.c +++ b/src/macmenu.c @@ -1406,7 +1406,7 @@ install_menu_quit_handler (MenuHandle menu_handle) 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 @@ set_frame_menubar (f, first_time, deep_p) 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 @@ pop_down_menu (arg) { 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 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) /* 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 --git a/src/process.c b/src/process.c index d2d4390c501..0a4ee8aee46 100644 --- a/src/process.c +++ b/src/process.c @@ -4887,10 +4887,10 @@ read_process_output (proc, channel) { 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 (proc, channel) 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 @@ exec_sentinel (proc, reason) 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 (proc, reason) 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 --git a/src/w32menu.c b/src/w32menu.c index 8a90eae7ec7..c5af0aae980 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1443,7 +1443,8 @@ set_frame_menubar (f, first_time, deep_p) 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 --git a/src/xdisp.c b/src/xdisp.c index fb5b8fbe6f2..3a44cc808c0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8489,7 +8489,7 @@ prepare_menu_bars () 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 @@ update_menu_bar (f, save_match_data) 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 @@ update_tool_bar (f, save_match_data) /* 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 --git a/src/xmenu.c b/src/xmenu.c index 6f758d12fc7..16d4e0029cd 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -2030,7 +2030,7 @@ set_frame_menubar (f, first_time, deep_p) 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)) { |