aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-05-17 04:30:32 +0000
committerRichard M. Stallman1994-05-17 04:30:32 +0000
commit78c8278d36efa24e17346ea532395e01eee789c2 (patch)
tree0b018399145a64c481c94e6a8550598945c86282 /src
parent2b1bdf65a991dda471e5217acadc5919a4c76d62 (diff)
downloademacs-78c8278d36efa24e17346ea532395e01eee789c2.tar.gz
emacs-78c8278d36efa24e17346ea532395e01eee789c2.zip
(xmenu_show): Completely ignore nameless panes
except for the first pane. Ignore named panes too if KEYMAPS.
Diffstat (limited to 'src')
-rw-r--r--src/xmenu.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 3b48ad97afa..2cb5974b4e5 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1382,6 +1382,8 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1382 1382
1383 Position root_x, root_y; 1383 Position root_x, root_y;
1384 1384
1385 int first_pane;
1386
1385 *error = NULL; 1387 *error = NULL;
1386 1388
1387 if (menu_items_used <= MENU_ITEMS_PANE_LENGTH) 1389 if (menu_items_used <= MENU_ITEMS_PANE_LENGTH)
@@ -1438,6 +1440,7 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1438 wv->value = 0; 1440 wv->value = 0;
1439 wv->enabled = 1; 1441 wv->enabled = 1;
1440 first_wv = wv; 1442 first_wv = wv;
1443 first_pane = 1;
1441 1444
1442 /* Loop over all panes and items, filling in the tree. */ 1445 /* Loop over all panes and items, filling in the tree. */
1443 i = 0; 1446 i = 0;
@@ -1448,12 +1451,14 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1448 submenu_stack[submenu_depth++] = save_wv; 1451 submenu_stack[submenu_depth++] = save_wv;
1449 save_wv = prev_wv; 1452 save_wv = prev_wv;
1450 prev_wv = 0; 1453 prev_wv = 0;
1454 first_pane = 1;
1451 i++; 1455 i++;
1452 } 1456 }
1453 else if (EQ (XVECTOR (menu_items)->contents[i], Qlambda)) 1457 else if (EQ (XVECTOR (menu_items)->contents[i], Qlambda))
1454 { 1458 {
1455 prev_wv = save_wv; 1459 prev_wv = save_wv;
1456 save_wv = submenu_stack[--submenu_depth]; 1460 save_wv = submenu_stack[--submenu_depth];
1461 first_pane = 0;
1457 i++; 1462 i++;
1458 } 1463 }
1459 else if (EQ (XVECTOR (menu_items)->contents[i], Qt) 1464 else if (EQ (XVECTOR (menu_items)->contents[i], Qt)
@@ -1480,7 +1485,7 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1480 /* If the pane has a meaningful name, 1485 /* If the pane has a meaningful name,
1481 make the pane a top-level menu item 1486 make the pane a top-level menu item
1482 with its items as a submenu beneath it. */ 1487 with its items as a submenu beneath it. */
1483 if (strcmp (pane_string, "")) 1488 if (!keymaps && strcmp (pane_string, ""))
1484 { 1489 {
1485 wv = malloc_widget_value (); 1490 wv = malloc_widget_value ();
1486 if (save_wv) 1491 if (save_wv)
@@ -1492,9 +1497,15 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1492 wv->name++; 1497 wv->name++;
1493 wv->value = 0; 1498 wv->value = 0;
1494 wv->enabled = 1; 1499 wv->enabled = 1;
1500 save_wv = wv;
1501 prev_wv = 0;
1495 } 1502 }
1496 save_wv = wv; 1503 else if (first_pane)
1497 prev_wv = 0; 1504 {
1505 save_wv = wv;
1506 prev_wv = 0;
1507 }
1508 first_pane = 0;
1498 i += MENU_ITEMS_PANE_LENGTH; 1509 i += MENU_ITEMS_PANE_LENGTH;
1499 } 1510 }
1500 else 1511 else