Commit c1fc674b authored by Andreas Schwab's avatar Andreas Schwab
Browse files

* 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.
parent 7d619454
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
......
......@@ -6664,6 +6664,13 @@ init_display ()
#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
......
......@@ -53,10 +53,6 @@ Boston, MA 02110-1301, USA. */
#include "buffer.h"
#include "window.h"
#ifdef HAVE_X_WINDOWS
#include "xterm.h"
#endif
#include "systty.h"
#include "blockinput.h"
#include "syssignal.h"
......@@ -1486,14 +1482,6 @@ main (argc, argv
/* 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
......
......@@ -10123,12 +10123,8 @@ x_display_ok (display)
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment