Fixes: debbugs:17865
[bpt/emacs.git] / src / menu.c
index 47ebc92..468f281 100644 (file)
@@ -415,7 +415,8 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
        item_string = concat2 (prefix, item_string);
   }
 
-  if (FRAME_TERMCAP_P (XFRAME (Vmenu_updating_frame))
+  if ((FRAME_TERMCAP_P (XFRAME (Vmenu_updating_frame))
+       || FRAME_MSDOS_P (XFRAME (Vmenu_updating_frame)))
       && !NILP (map))
     /* Indicate visually that this is a submenu.  */
     item_string = concat2 (item_string, build_string (" >"));
@@ -1442,6 +1443,7 @@ no quit occurs and `x-popup-menu' returns nil.  */)
                            keymaps, title, &error_name);
   else
 #endif
+#ifndef MSDOS
   if (FRAME_TERMCAP_P (f))
     {
       ptrdiff_t count1 = SPECPDL_INDEX ();
@@ -1453,6 +1455,7 @@ no quit occurs and `x-popup-menu' returns nil.  */)
                                 kbd_menu_navigation, &error_name);
       unbind_to (count1, Qnil);
     }
+#endif
 
 #ifdef HAVE_NS
   unbind_to (specpdl_count, Qnil);
@@ -1561,26 +1564,23 @@ for instance using the window manager, then this produces a quit and
      Do this before creating the widget value that points to Lisp
      string contents, because Fredisplay may GC and relocate them.  */
   Fredisplay (Qt);
-#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
+
+#if defined USE_X_TOOLKIT || defined USE_GTK
   if (FRAME_WINDOW_P (f))
     return xw_popup_dialog (f, header, contents);
-  else
 #endif
-#if defined (HAVE_NTGUI)
+#ifdef HAVE_NTGUI
   if (FRAME_W32_P (f))
     {
       Lisp_Object selection = w32_popup_dialog (f, header, contents);
 
       if (!EQ (selection, Qunsupported__w32_dialog))
        return selection;
-      goto dialog_via_menu;
     }
-  else
 #endif
 #ifdef HAVE_NS
   if (FRAME_NS_P (f))
     return ns_popup_dialog (position, header, contents);
-  else
 #endif
   /* Display a menu with these alternatives
      in the middle of frame F.  */
@@ -1588,8 +1588,6 @@ for instance using the window manager, then this produces a quit and
     Lisp_Object x, y, frame, newpos, prompt;
     int x_coord, y_coord;
 
-  dialog_via_menu:
-
     prompt = Fcar (contents);
     if (FRAME_WINDOW_P (f))
       {