From 846e8c10a08a1995639e0e383ac96a5047cedac7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 31 May 1996 20:10:02 +0000 Subject: [PATCH] (single_submenu): Handle non-keymap lists like symbols. --- src/xmenu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xmenu.c b/src/xmenu.c index ef2bbd792ac..1ea7140d50f 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1377,8 +1377,12 @@ single_submenu (item_key, item_name, maps) But don't make a pane that is empty--ignore that map instead. */ for (i = 0; i < len; i++) { - if (SYMBOLP (mapvec[i])) + if (SYMBOLP (mapvec[i]) + || (CONSP (mapvec[i]) + && NILP (Fkeymapp (mapvec[i])))) { + /* Here we have a command at top level in the menu bar + as opposed to a submenu. */ top_level_items = 1; push_menu_pane (Qnil, Qnil); push_menu_item (item_name, Qt, item_key, mapvec[i], Qnil); -- 2.39.2