mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 18:41:25 -08:00
(main): If user asks for a display that is unavailable, simulate -nw.
This commit is contained in:
parent
c85eab3af0
commit
c5e02f73cd
1 changed files with 12 additions and 0 deletions
12
src/emacs.c
12
src/emacs.c
|
|
@ -53,6 +53,10 @@ 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"
|
||||
|
|
@ -1482,6 +1486,14 @@ 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue