summaryrefslogtreecommitdiff
path: root/src/dispnew.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 87d99fd9917..1d977898f60 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6866,9 +6866,15 @@ init_display ()
For types defined in VMS, use set term /device=TYPE.\n\
For types not defined in VMS, use define emacs_term \"TYPE\".\n\
\(The quotation marks are necessary since terminal types are lower case.)\n");
-#else
- fprintf (stderr, "Please set the environment variable TERM; see tset(1).\n");
-#endif
+#else /* not VMS */
+
+#ifdef HAVE_WINDOW_SYSTEM
+ if (! inhibit_window_system)
+ fprintf (stderr, "Please set the environment variable DISPLAY or TERM (see `tset').\n");
+ else
+#endif /* HAVE_WINDOW_SYSTEM */
+ fprintf (stderr, "Please set the environment variable TERM; see `tset'.\n");
+#endif /* not VMS */
exit (1);
}