diff options
| author | Kim F. Storm | 2005-06-08 22:33:36 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-06-08 22:33:36 +0000 |
| commit | 89f2614d96b5cf84f01c4903652a6a2b5b23d3d3 (patch) | |
| tree | 9aed849b4b7e3c1a44ba3bd3b6f09a0c3002c06a /src | |
| parent | 5fe2b5a58dc9d211eb523b11f2731b03b8bd525d (diff) | |
| download | emacs-89f2614d96b5cf84f01c4903652a6a2b5b23d3d3.tar.gz emacs-89f2614d96b5cf84f01c4903652a6a2b5b23d3d3.zip | |
* 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.
Diffstat (limited to 'src')
| -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) | |||
| 628 | } | 628 | } |
| 629 | 629 | ||
| 630 | /* Preserve the match data. */ | 630 | /* Preserve the match data. */ |
| 631 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 631 | record_unwind_save_match_data (); |
| 632 | 632 | ||
| 633 | /* If none of ASCII characters have composition functions, we can | 633 | /* If none of ASCII characters have composition functions, we can |
| 634 | skip them quickly. */ | 634 | 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) | |||
| 1971 | GCPRO3 (fun, funname, fundef); | 1971 | GCPRO3 (fun, funname, fundef); |
| 1972 | 1972 | ||
| 1973 | /* Preserve the match data. */ | 1973 | /* Preserve the match data. */ |
| 1974 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 1974 | record_unwind_save_match_data (); |
| 1975 | 1975 | ||
| 1976 | /* Value saved here is to be restored into Vautoload_queue. */ | 1976 | /* Value saved here is to be restored into Vautoload_queue. */ |
| 1977 | record_unwind_protect (un_autoload, Vautoload_queue); | 1977 | 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) | |||
| 1406 | EventTypeSpec typesList[] = { { kEventClassKeyboard, kEventRawKeyDown } }; | 1406 | EventTypeSpec typesList[] = { { kEventClassKeyboard, kEventRawKeyDown } }; |
| 1407 | int i = MIN_MENU_ID; | 1407 | int i = MIN_MENU_ID; |
| 1408 | MenuHandle menu = menu_handle ? menu_handle : GetMenuHandle (i); | 1408 | MenuHandle menu = menu_handle ? menu_handle : GetMenuHandle (i); |
| 1409 | 1409 | ||
| 1410 | while (menu != NULL) | 1410 | while (menu != NULL) |
| 1411 | { | 1411 | { |
| 1412 | InstallMenuEventHandler (menu, handler, GetEventTypeCount (typesList), | 1412 | InstallMenuEventHandler (menu, handler, GetEventTypeCount (typesList), |
| @@ -1475,7 +1475,7 @@ set_frame_menubar (f, first_time, deep_p) | |||
| 1475 | because it is not reentrant. */ | 1475 | because it is not reentrant. */ |
| 1476 | specbind (Qdebug_on_next_call, Qnil); | 1476 | specbind (Qdebug_on_next_call, Qnil); |
| 1477 | 1477 | ||
| 1478 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 1478 | record_unwind_save_match_data (); |
| 1479 | if (NILP (Voverriding_local_map_menu_flag)) | 1479 | if (NILP (Voverriding_local_map_menu_flag)) |
| 1480 | { | 1480 | { |
| 1481 | specbind (Qoverriding_terminal_local_map, Qnil); | 1481 | specbind (Qoverriding_terminal_local_map, Qnil); |
| @@ -1676,7 +1676,7 @@ pop_down_menu (arg) | |||
| 1676 | { | 1676 | { |
| 1677 | struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg)); | 1677 | struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg)); |
| 1678 | struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg)); | 1678 | struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg)); |
| 1679 | 1679 | ||
| 1680 | FRAME_PTR f = p1->pointer; | 1680 | FRAME_PTR f = p1->pointer; |
| 1681 | MenuHandle *menu = p2->pointer; | 1681 | MenuHandle *menu = p2->pointer; |
| 1682 | 1682 | ||
| @@ -1955,7 +1955,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1955 | 1955 | ||
| 1956 | /* Add event handler so we can detect C-g. */ | 1956 | /* Add event handler so we can detect C-g. */ |
| 1957 | install_menu_quit_handler (menu); | 1957 | install_menu_quit_handler (menu); |
| 1958 | 1958 | ||
| 1959 | /* Display the menu. */ | 1959 | /* Display the menu. */ |
| 1960 | menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0); | 1960 | menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0); |
| 1961 | menu_item_selection = LoWord (menu_item_choice); | 1961 | 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) | |||
| 4887 | { | 4887 | { |
| 4888 | Lisp_Object tem; | 4888 | Lisp_Object tem; |
| 4889 | /* Don't clobber the CURRENT match data, either! */ | 4889 | /* Don't clobber the CURRENT match data, either! */ |
| 4890 | tem = Fmatch_data (Qnil, Qnil); | 4890 | tem = Fmatch_data (Qnil, Qnil, Qnil); |
| 4891 | restore_match_data (); | 4891 | restore_search_regs (); |
| 4892 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 4892 | record_unwind_save_match_data (); |
| 4893 | Fset_match_data (tem); | 4893 | Fset_match_data (tem, Qt); |
| 4894 | } | 4894 | } |
| 4895 | 4895 | ||
| 4896 | /* For speed, if a search happens within this code, | 4896 | /* For speed, if a search happens within this code, |
| @@ -4944,7 +4944,7 @@ read_process_output (proc, channel) | |||
| 4944 | read_process_output_error_handler); | 4944 | read_process_output_error_handler); |
| 4945 | 4945 | ||
| 4946 | /* If we saved the match data nonrecursively, restore it now. */ | 4946 | /* If we saved the match data nonrecursively, restore it now. */ |
| 4947 | restore_match_data (); | 4947 | restore_search_regs (); |
| 4948 | running_asynch_code = outer_running_asynch_code; | 4948 | running_asynch_code = outer_running_asynch_code; |
| 4949 | 4949 | ||
| 4950 | /* Handling the process output should not deactivate the mark. */ | 4950 | /* Handling the process output should not deactivate the mark. */ |
| @@ -6348,10 +6348,10 @@ exec_sentinel (proc, reason) | |||
| 6348 | if (outer_running_asynch_code) | 6348 | if (outer_running_asynch_code) |
| 6349 | { | 6349 | { |
| 6350 | Lisp_Object tem; | 6350 | Lisp_Object tem; |
| 6351 | tem = Fmatch_data (Qnil, Qnil); | 6351 | tem = Fmatch_data (Qnil, Qnil, Qnil); |
| 6352 | restore_match_data (); | 6352 | restore_search_regs (); |
| 6353 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 6353 | record_unwind_save_match_data (); |
| 6354 | Fset_match_data (tem); | 6354 | Fset_match_data (tem, Qt); |
| 6355 | } | 6355 | } |
| 6356 | 6356 | ||
| 6357 | /* For speed, if a search happens within this code, | 6357 | /* For speed, if a search happens within this code, |
| @@ -6365,7 +6365,7 @@ exec_sentinel (proc, reason) | |||
| 6365 | exec_sentinel_error_handler); | 6365 | exec_sentinel_error_handler); |
| 6366 | 6366 | ||
| 6367 | /* If we saved the match data nonrecursively, restore it now. */ | 6367 | /* If we saved the match data nonrecursively, restore it now. */ |
| 6368 | restore_match_data (); | 6368 | restore_search_regs (); |
| 6369 | running_asynch_code = outer_running_asynch_code; | 6369 | running_asynch_code = outer_running_asynch_code; |
| 6370 | 6370 | ||
| 6371 | Vdeactivate_mark = odeactivate; | 6371 | 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) | |||
| 1443 | because it is not reentrant. */ | 1443 | because it is not reentrant. */ |
| 1444 | specbind (Qdebug_on_next_call, Qnil); | 1444 | specbind (Qdebug_on_next_call, Qnil); |
| 1445 | 1445 | ||
| 1446 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 1446 | record_unwind_save_match_data (); |
| 1447 | |||
| 1447 | if (NILP (Voverriding_local_map_menu_flag)) | 1448 | if (NILP (Voverriding_local_map_menu_flag)) |
| 1448 | { | 1449 | { |
| 1449 | specbind (Qoverriding_terminal_local_map, Qnil); | 1450 | 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 () | |||
| 8489 | Lisp_Object tail, frame; | 8489 | Lisp_Object tail, frame; |
| 8490 | int count = SPECPDL_INDEX (); | 8490 | int count = SPECPDL_INDEX (); |
| 8491 | 8491 | ||
| 8492 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 8492 | record_unwind_save_match_data (); |
| 8493 | 8493 | ||
| 8494 | FOR_EACH_FRAME (tail, frame) | 8494 | FOR_EACH_FRAME (tail, frame) |
| 8495 | { | 8495 | { |
| @@ -8612,7 +8612,7 @@ update_menu_bar (f, save_match_data) | |||
| 8612 | 8612 | ||
| 8613 | set_buffer_internal_1 (XBUFFER (w->buffer)); | 8613 | set_buffer_internal_1 (XBUFFER (w->buffer)); |
| 8614 | if (save_match_data) | 8614 | if (save_match_data) |
| 8615 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 8615 | record_unwind_save_match_data (); |
| 8616 | if (NILP (Voverriding_local_map_menu_flag)) | 8616 | if (NILP (Voverriding_local_map_menu_flag)) |
| 8617 | { | 8617 | { |
| 8618 | specbind (Qoverriding_terminal_local_map, Qnil); | 8618 | specbind (Qoverriding_terminal_local_map, Qnil); |
| @@ -8803,7 +8803,7 @@ update_tool_bar (f, save_match_data) | |||
| 8803 | 8803 | ||
| 8804 | /* Save match data, if we must. */ | 8804 | /* Save match data, if we must. */ |
| 8805 | if (save_match_data) | 8805 | if (save_match_data) |
| 8806 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 8806 | record_unwind_save_match_data (); |
| 8807 | 8807 | ||
| 8808 | /* Make sure that we don't accidentally use bogus keymaps. */ | 8808 | /* Make sure that we don't accidentally use bogus keymaps. */ |
| 8809 | if (NILP (Voverriding_local_map_menu_flag)) | 8809 | 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) | |||
| 2030 | because it is not reentrant. */ | 2030 | because it is not reentrant. */ |
| 2031 | specbind (Qdebug_on_next_call, Qnil); | 2031 | specbind (Qdebug_on_next_call, Qnil); |
| 2032 | 2032 | ||
| 2033 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 2033 | record_unwind_save_match_data (); |
| 2034 | record_unwind_protect (unuse_menu_items, Qnil); | 2034 | record_unwind_protect (unuse_menu_items, Qnil); |
| 2035 | if (NILP (Voverriding_local_map_menu_flag)) | 2035 | if (NILP (Voverriding_local_map_menu_flag)) |
| 2036 | { | 2036 | { |