diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-01-26 21:27:38 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-01-26 21:27:38 +0000 |
commit | 436f4693fe9bf5ecd5fdba14af3a85ab3b76845e (patch) | |
tree | 90ea21bf288f0daa26cb81ebfd66f266891539f9 /lib-src/emacsclient.c | |
parent | a1a3710b121c2d86f63e162066e967f207a16791 (diff) | |
download | emacs-436f4693fe9bf5ecd5fdba14af3a85ab3b76845e.tar.gz |
(decode_options): Default to a NULL display, as Emacs-22.
Allow the -d option under w32 again, for those rare cases where it
actually does make sense.
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r-- | lib-src/emacsclient.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index b8ab19721ff..707be43b5f7 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -479,10 +479,14 @@ decode_options (argc, argv) char **argv; { alternate_editor = egetenv ("ALTERNATE_EDITOR"); -#ifndef WINDOWSNT + + /* We used to set `display' to $DISPLAY by default, but this changed the + default behavior and is sometimes inconvenient. So instead of forcing + users to say "--display ''" when they want to use Emacs's existing tty + or display connection, we force them to use "--display $DISPLAY" if + they want Emacs to connect to their current display. */ +#if 0 display = egetenv ("DISPLAY"); - if (display && strlen (display) == 0) - display = NULL; #endif while (1) @@ -519,7 +523,11 @@ decode_options (argc, argv) server_file = optarg; break; -#ifndef WINDOWSNT + /* We used to disallow this argument in w32, but it seems better + to allow it, for the occasional case where the user is + connecting with a w32 client to a server compiled with X11 + support. */ +#if 1 /* !defined WINDOWS */ case 'd': display = optarg; break; @@ -558,6 +566,9 @@ decode_options (argc, argv) } } + if (display && strlen (display) == 0) + display = NULL; + if (!tty && display) window_system = 1; #if !defined (WINDOWSNT) && !defined (HAVE_CARBON) |