X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/2e875e36887608b9e677bf4a3b45acfe6041ff06..ab952a4f345b6fc20037225cb8d7b790c5cde7f6:/mac/src/macmenu.c diff --git a/mac/src/macmenu.c b/mac/src/macmenu.c index 41536e466a..b7ed55adce 100644 --- a/mac/src/macmenu.c +++ b/mac/src/macmenu.c @@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "charset.h" #include "coding.h" +#include "keymap.h" #include #include @@ -735,7 +736,7 @@ cached information about equivalent key sequences.") /* Search for a string appearing directly as an element of the keymap. That string is the title of the menu. */ - prompt = map_prompt (keymap); + prompt = Fkeymap_prompt (keymap); if (NILP (title) && !NILP (prompt)) title = prompt; @@ -763,7 +764,7 @@ cached information about equivalent key sequences.") maps[i++] = keymap = get_keymap (Fcar (tem)); - prompt = map_prompt (keymap); + prompt = Fkeymap_prompt (keymap); if (NILP (title) && !NILP (prompt)) title = prompt; } @@ -1702,14 +1703,13 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) SetPort (FRAME_MAC_WINDOW (f)); LocalToGlobal (&pos); - /* No selection has been chosen yet. */ - menu_item_selection = 0; - InsertMenu (menu, -1); /* Display the menu. */ menu_item_selection = LoWord (PopUpMenuSelect (menu, pos.v, pos.h, 0)); + GetMenuItemRefCon (menu, menu_item_selection, &menu_item_selection); + DeleteMenu (POPUP_SUBMENU_ID); #if 0