diff options
| author | Richard M. Stallman | 1998-10-12 06:13:00 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-10-12 06:13:00 +0000 |
| commit | 9ac425d1692c65c6c517e2d7d0c12c4295b80ef2 (patch) | |
| tree | 8967594ab3c553c3e1475c6e50aa33aeb9b00071 /src | |
| parent | b5174a51038a782ff1d80f303252f04b72dbdc03 (diff) | |
| download | emacs-9ac425d1692c65c6c517e2d7d0c12c4295b80ef2.tar.gz emacs-9ac425d1692c65c6c517e2d7d0c12c4295b80ef2.zip | |
(parse_menu_item): For top level of menu bar,
accept ordinary commands, and treat them just like a keymap.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 8 |
1 files changed, 6 insertions, 2 deletions
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) | |||
| 6017 | /* See if this is a separate pane or a submenu. */ | 6017 | /* See if this is a separate pane or a submenu. */ |
| 6018 | def = XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF]; | 6018 | def = XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF]; |
| 6019 | tem = get_keymap_1 (def, 0, 1); | 6019 | tem = get_keymap_1 (def, 0, 1); |
| 6020 | /* For a subkeymap, just record its details and exit. */ | ||
| 6020 | if (!NILP (tem)) | 6021 | if (!NILP (tem)) |
| 6021 | { | 6022 | { |
| 6022 | XVECTOR (item_properties)->contents[ITEM_PROPERTY_MAP] = tem; | 6023 | XVECTOR (item_properties)->contents[ITEM_PROPERTY_MAP] = tem; |
| 6023 | XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF] = tem; | 6024 | XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF] = tem; |
| 6024 | return 1; | 6025 | return 1; |
| 6025 | } | 6026 | } |
| 6026 | else if (inmenubar > 0) | 6027 | /* At the top level in the menu bar, do likewise for commands also. |
| 6027 | return 0; /* Entries in menu bar must be submenus. */ | 6028 | The menu bar does not display equivalent key bindings anyway. |
| 6029 | ITEM_PROPERTY_DEF is already set up properly. */ | ||
| 6030 | if (inmenubar > 0) | ||
| 6031 | return 1; | ||
| 6028 | 6032 | ||
| 6029 | /* This is a command. See if there is an equivalent key binding. */ | 6033 | /* This is a command. See if there is an equivalent key binding. */ |
| 6030 | if (NILP (cachelist)) | 6034 | if (NILP (cachelist)) |