Commit 60d9e1db authored by Paul Eggert's avatar Paul Eggert

* menu.c (push_submenu_start, push_submenu_end): Do not define unless

USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
(single_menu_item): Rename local to avoid shadowing.
parent 39261c26
2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
* menu.c (push_submenu_start, push_submenu_end): Do not define unless
USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
(single_menu_item): Rename local to avoid shadowing.
* keyboard.c (make_lispy_event): Remove unused local var.
* frame.c, frame.h (x_get_resource_string): Bring this back, but
......
......@@ -180,6 +180,9 @@ grow_menu_items (void)
menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
}
#if (defined USE_X_TOOLKIT || defined USE_GTK || defined HAVE_NS \
|| defined HAVE_NTGUI)
/* Begin a submenu. */
static void
......@@ -204,6 +207,8 @@ push_submenu_end (void)
menu_items_submenu_depth--;
}
#endif /* USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI */
/* Indicate boundary between left and right. */
static void
......@@ -368,34 +373,34 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
if (skp->notbuttons)
/* The first button. Line up previous items in this menu. */
{
int index = skp->notbuttons; /* Index for first item this menu. */
int idx = skp->notbuttons; /* Index for first item this menu. */
int submenu = 0;
Lisp_Object tem;
while (index < menu_items_used)
while (idx < menu_items_used)
{
tem
= XVECTOR (menu_items)->contents[index + MENU_ITEMS_ITEM_NAME];
= XVECTOR (menu_items)->contents[idx + MENU_ITEMS_ITEM_NAME];
if (NILP (tem))
{
index++;
idx++;
submenu++; /* Skip sub menu. */
}
else if (EQ (tem, Qlambda))
{
index++;
idx++;
submenu--; /* End sub menu. */
}
else if (EQ (tem, Qt))
index += 3; /* Skip new pane marker. */
idx += 3; /* Skip new pane marker. */
else if (EQ (tem, Qquote))
index++; /* Skip a left, right divider. */
idx++; /* Skip a left, right divider. */
else
{
if (!submenu && SREF (tem, 0) != '\0'
&& SREF (tem, 0) != '-')
XVECTOR (menu_items)->contents[index + MENU_ITEMS_ITEM_NAME]
XVECTOR (menu_items)->contents[idx + MENU_ITEMS_ITEM_NAME]
= concat2 (build_string (" "), tem);
index += MENU_ITEMS_ITEM_LENGTH;
idx += MENU_ITEMS_ITEM_LENGTH;
}
}
skp->notbuttons = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment