aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1996-01-09 23:38:07 +0000
committerKarl Heuer1996-01-09 23:38:07 +0000
commit36bbad1d7e05c4127e66305541364a29a3f2ed97 (patch)
tree46e65f5fae21824ee4d8ba4322791179a00029a2 /src
parent4e6801b7e5c916be69b59b22ce7a2c1774a55cfe (diff)
downloademacs-36bbad1d7e05c4127e66305541364a29a3f2ed97.tar.gz
emacs-36bbad1d7e05c4127e66305541364a29a3f2ed97.zip
(init_display): Treat null string DISPLAY var like not set.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 19f6c33c1cf..1b958bcd29f 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -2472,17 +2472,20 @@ init_display ()
2472 terminal is so dumb that emacs gives up before and doesn't bother 2472 terminal is so dumb that emacs gives up before and doesn't bother
2473 using the window system. 2473 using the window system.
2474 2474
2475 If the DISPLAY environment variable is set, try to use X, and die 2475 If the DISPLAY environment variable is set and nonempty,
2476 with an error message if that doesn't work. */ 2476 try to use X, and die with an error message if that doesn't work. */
2477 2477
2478#ifdef HAVE_X_WINDOWS 2478#ifdef HAVE_X_WINDOWS
2479 if (! display_arg) 2479 if (! display_arg)
2480 { 2480 {
2481 char *display;
2481#ifdef VMS 2482#ifdef VMS
2482 display_arg = (getenv ("DECW$DISPLAY") != 0); 2483 display = getenv ("DECW$DISPLAY");
2483#else 2484#else
2484 display_arg = (getenv ("DISPLAY") != 0); 2485 display = getenv ("DISPLAY");
2485#endif 2486#endif
2487
2488 display_arg = (display != 0 && *display != 0);
2486 } 2489 }
2487 2490
2488 if (!inhibit_window_system && display_arg) 2491 if (!inhibit_window_system && display_arg)