diff options
| author | Eli Zaretskii | 2006-03-18 13:48:33 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-03-18 13:48:33 +0000 |
| commit | c5e02f73cdebc11afc5f2f62060c29db24878ed7 (patch) | |
| tree | 39b4eff4efcd4b9f3a8748dd73f5899b882909e3 /src | |
| parent | c85eab3af046e8b24c79f6582174d1a567fb0ad5 (diff) | |
| download | emacs-c5e02f73cdebc11afc5f2f62060c29db24878ed7.tar.gz emacs-c5e02f73cdebc11afc5f2f62060c29db24878ed7.zip | |
(main): If user asks for a display that is unavailable, simulate -nw.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c index 846bfc7e453..259c8c3381e 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -53,6 +53,10 @@ Boston, MA 02110-1301, USA. */ | |||
| 53 | #include "buffer.h" | 53 | #include "buffer.h" |
| 54 | #include "window.h" | 54 | #include "window.h" |
| 55 | 55 | ||
| 56 | #ifdef HAVE_X_WINDOWS | ||
| 57 | #include "xterm.h" | ||
| 58 | #endif | ||
| 59 | |||
| 56 | #include "systty.h" | 60 | #include "systty.h" |
| 57 | #include "blockinput.h" | 61 | #include "blockinput.h" |
| 58 | #include "syssignal.h" | 62 | #include "syssignal.h" |
| @@ -1482,6 +1486,14 @@ main (argc, argv | |||
| 1482 | 1486 | ||
| 1483 | /* Don't actually discard this arg. */ | 1487 | /* Don't actually discard this arg. */ |
| 1484 | skip_args = count_before; | 1488 | skip_args = count_before; |
| 1489 | |||
| 1490 | /* Do not be lenient if the user explicitly asked for a named display. */ | ||
| 1491 | if (display_arg != 1 && !x_display_ok (displayname)) | ||
| 1492 | { | ||
| 1493 | fprintf (stderr, "Display %s unavailable, simulating -nw\n", | ||
| 1494 | displayname); | ||
| 1495 | inhibit_window_system = 1; | ||
| 1496 | } | ||
| 1485 | } | 1497 | } |
| 1486 | #endif | 1498 | #endif |
| 1487 | 1499 | ||