*** w32menu.c.nico Mon May 12 16:48:28 1997
--- w32menu.c Fri May 16 19:00:40 1997
***************
*** 125,130 ****
--- 125,149 ----
    lpmm->menu_items_allocated = lpmm->menu_items_used = 0;
  }
  
+ /* Is this item a separator? */
+ static int
+ name_is_separator (name)
+      Lisp_Object name;
+ {
+   int isseparator = (((char *)XSTRING (name)->data)[0] == 0);
+ 
+   if (!isseparator)
+     {
+       /* Check if name string consists of only dashes ('-') */
+       char *string = (char *)XSTRING (name)->data;
+       while (*string == '-') string++;
+       isseparator = (*string == 0);
+     }
+ 
+   return isseparator;
+ }
+ 
+ 
  /* Indicate boundary between left and right.  */
  
  static void 
***************
*** 152,160 ****
    UINT fuFlags;
    Lisp_Object out_string;
    
!   if (NILP (name) 
!       || ((char *) XSTRING (name)->data)[0] == 0
!       || strcmp ((char *) XSTRING (name)->data, "--") == 0)
      fuFlags = MF_SEPARATOR;
    else 
      {
--- 171,177 ----
    UINT fuFlags;
    Lisp_Object out_string;
    
!   if (NILP (name) || name_is_separator (name))
      fuFlags = MF_SEPARATOR;
    else 
      {
***************
*** 1715,1722 ****
      enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE];
      //	  descrip = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY];
  
!     if (((char *) XSTRING (item_name)->data)[0] == 0
! 	|| strcmp ((char *) XSTRING (item_name)->data, "--") == 0)
        fuFlags = MF_SEPARATOR;
      else if (NILP (enable) || !XUINT (enable))
        fuFlags = MF_STRING | MF_GRAYED;
--- 1732,1738 ----
      enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE];
      //	  descrip = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY];
  
!     if (name_is_separator (item_name))
        fuFlags = MF_SEPARATOR;
      else if (NILP (enable) || !XUINT (enable))
        fuFlags = MF_STRING | MF_GRAYED;
*** ChangeLog.nico Mon May 12 17:12:28 1997
--- ChangeLog Fri May 16 19:12:50 1997
***************
*** 1,3 ****
--- 1,12 ----
+ Fri May 16 19:08:34 1997  Nico Francois  <nico.francois@scala.nl>
+ 
+ 	* w32menu.c (name_is_separator): New function.  Will check if
+ 	a menu item name is a separator.  An empty name or a name consting
+ 	only of dashes ('-') is considered a separator.  Previously only
+ 	names with exactly two dashes ("--") where considered separators,
+ 	but some packages use more than two dashes when they want to add a
+ 	separator to a menu (vc-hooks.el for example).
+ 
  Mon May 12 16:57:32 1997  Nico Francois  <nico.francois@scala.nl>
  
  	* w32menu.c (list_of_panes): If a pane's name is empty ("") items
