Mercurial > emacs
comparison src/macmenu.c @ 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 | a817e29f8ce0 |
children | a8fa7c632ee4 173dee4e2611 |
comparison
equal
deleted
inserted
replaced
63146:7dced3c64549 | 63147:9bde03db5726 |
---|---|
1404 EventHandlerUPP handler = NewEventHandlerUPP(menu_quit_handler); | 1404 EventHandlerUPP handler = NewEventHandlerUPP(menu_quit_handler); |
1405 UInt32 numTypes = 1; | 1405 UInt32 numTypes = 1; |
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), |
1413 typesList, menu_handle, NULL); | 1413 typesList, menu_handle, NULL); |
1414 if (menu_handle) break; | 1414 if (menu_handle) break; |
1473 specbind (Qinhibit_quit, Qt); | 1473 specbind (Qinhibit_quit, Qt); |
1474 /* Don't let the debugger step into this code | 1474 /* Don't let the debugger step into this code |
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); |
1482 specbind (Qoverriding_local_map, Qnil); | 1482 specbind (Qoverriding_local_map, Qnil); |
1483 } | 1483 } |
1674 pop_down_menu (arg) | 1674 pop_down_menu (arg) |
1675 Lisp_Object arg; | 1675 Lisp_Object 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 |
1683 BLOCK_INPUT; | 1683 BLOCK_INPUT; |
1684 | 1684 |
1953 Fcons (make_save_value (f, 0), | 1953 Fcons (make_save_value (f, 0), |
1954 make_save_value (&menu, 0))); | 1954 make_save_value (&menu, 0))); |
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); |
1962 | 1962 |
1963 /* Get the refcon to find the correct item */ | 1963 /* Get the refcon to find the correct item */ |