]> code.delx.au - gnu-emacs/blobdiff - src/xmenu.c
Consistently use platform-specific function to detect window system.
[gnu-emacs] / src / xmenu.c
index 57cf27f955df7280e3d2fb50c170315b1b4e805b..e6291edf7d650f9b15fc8196a6f5bb30b2c55875 100644 (file)
@@ -223,7 +223,7 @@ for instance using the window manager, then this produces a quit and
   FRAME_PTR f = NULL;
   Lisp_Object window;
 
-  check_x ();
+  check_window_system ();
 
   /* Decode the first argument: find the window or frame to use.  */
   if (EQ (position, Qt)
@@ -976,7 +976,7 @@ set_frame_menubar (FRAME_PTR f, bool first_time, bool deep_p)
       if (! menubar_widget)
        previous_menu_items_used = 0;
 
-      buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
+      buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->contents;
       specbind (Qinhibit_quit, Qt);
       /* Don't let the debugger step into this code
         because it is not reentrant.  */
@@ -1055,7 +1055,7 @@ set_frame_menubar (FRAME_PTR f, bool first_time, bool deep_p)
       wv->help = Qnil;
       first_wv = wv;
 
-      for (i = 0; 0 <= submenu_start[i]; i++)
+      for (i = 0; submenu_start[i] >= 0; i++)
        {
          menu_items_n_panes = submenu_n_panes[i];
          wv = digest_single_submenu (submenu_start[i], submenu_end[i],