From: Richard M. Stallman Date: Mon, 12 Oct 1998 06:13:00 +0000 (+0000) Subject: (parse_menu_item): For top level of menu bar, X-Git-Tag: emacs-20.4~1531 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9ac425d1692c65c6c517e2d7d0c12c4295b80ef2;p=emacs.git (parse_menu_item): For top level of menu bar, accept ordinary commands, and treat them just like a keymap. --- diff --git a/src/keyboard.c b/src/keyboard.c index 9f1915b0bb1..bc3d177a766 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -6017,14 +6017,18 @@ parse_menu_item (item, notreal, inmenubar) /* See if this is a separate pane or a submenu. */ def = XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF]; tem = get_keymap_1 (def, 0, 1); + /* For a subkeymap, just record its details and exit. */ if (!NILP (tem)) { XVECTOR (item_properties)->contents[ITEM_PROPERTY_MAP] = tem; XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF] = tem; return 1; } - else if (inmenubar > 0) - return 0; /* Entries in menu bar must be submenus. */ + /* At the top level in the menu bar, do likewise for commands also. + The menu bar does not display equivalent key bindings anyway. + ITEM_PROPERTY_DEF is already set up properly. */ + if (inmenubar > 0) + return 1; /* This is a command. See if there is an equivalent key binding. */ if (NILP (cachelist))