changeset 23418:13e4ce88374d

(parse_menu_item): For top level of menu bar, accept ordinary commands, and treat them just like a keymap.
author Richard M. Stallman <rms@gnu.org>
date Mon, 12 Oct 1998 06:13:00 +0000
parents 5e25a31007e8
children c251dd6b289e
files src/keyboard.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Mon Oct 12 01:38:50 1998 +0000
+++ b/src/keyboard.c	Mon Oct 12 06:13:00 1998 +0000
@@ -6017,14 +6017,18 @@
   /* 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))