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
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
menu_items_submenu_depth--;
}
+#endif /* USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI */
+
/* Indicate boundary between left and right. */
static void
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;