]> git.eshelyaron.com Git - emacs.git/commitdiff
(add_menu_item): Remove unused variable `i'. Don't
authorSteven Tamm <steventamm@mac.com>
Thu, 2 Sep 2004 17:00:36 +0000 (17:00 +0000)
committerSteven Tamm <steventamm@mac.com>
Thu, 2 Sep 2004 17:00:36 +0000 (17:00 +0000)
let separator items destroy refence constants of other menu items.

src/macmenu.c

index 88012b01f73861bcefc61dd166b8ea92244aa499..740bda261d86f5a6ff32ca65e3eca57fb910a958 100644 (file)
@@ -2240,7 +2240,7 @@ add_menu_item (MenuHandle menu, widget_value *wv, int submenu,
               int force_disable)
 {
   Str255 item_name;
-  int pos, i;
+  int pos;
 
   if (name_is_separator (wv->name))
     AppendMenu (menu, "\p-");
@@ -2296,9 +2296,9 @@ add_menu_item (MenuHandle menu, widget_value *wv, int submenu,
       else
        SetItemMark (menu, pos, noMark);
       }
-    }
 
-  SetMenuItemRefCon (menu, pos, (UInt32) wv->call_data);
+      SetMenuItemRefCon (menu, pos, (UInt32) wv->call_data);
+    }
 
   if (submenu != NULL)
     SetMenuItemHierarchicalID (menu, pos, submenu);