* emacs.c (main): Don't check here.
* xterm.c (x_display_ok): Don't use DISPLAY env var.
+2006-03-20 Andreas Schwab <schwab@suse.de>
+
+ * dispnew.c (init_display): Check DISPLAY here.
+
+ * emacs.c (main): Don't check here.
+
+ * xterm.c (x_display_ok): Don't use DISPLAY env var.
+
2006-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
* window.c (window_scroll_pixel_based): Yet another int/Lisp_Object
#endif
display_arg = (display != 0 && *display != 0);
+
+ if (display_arg && !x_display_ok (display))
+ {
+ fprintf (stderr, "Display %s unavailable, simulating -nw\n",
+ display);
+ inhibit_window_system = 1;
+ }
}
if (!inhibit_window_system && display_arg
#include "buffer.h"
#include "window.h"
-#ifdef HAVE_X_WINDOWS
-#include "xterm.h"
-#endif
-
#include "systty.h"
#include "blockinput.h"
#include "syssignal.h"
/* Don't actually discard this arg. */
skip_args = count_before;
-
- /* Do not be lenient if the user explicitly asked for a named display. */
- if (display_arg == 1 && !x_display_ok (displayname))
- {
- fprintf (stderr, "Display %s unavailable, simulating -nw\n",
- displayname);
- inhibit_window_system = 1;
- }
}
#endif
int dpy_ok = 1;
Display *dpy;
- if (!display)
- display = getenv("DISPLAY");
- if (!display)
- return 0;
-
- if ((dpy = XOpenDisplay (display)))
+ dpy = XOpenDisplay (display);
+ if (dpy)
XCloseDisplay (dpy);
else
dpy_ok = 0;