aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorStefan Monnier2008-02-08 15:25:58 +0000
committerStefan Monnier2008-02-08 15:25:58 +0000
commit9997dc15294bb1d2daa1e578c180cd297d5d6f78 (patch)
tree32d71a19d5125f985c8c8bb7d39c8c747922c80a /lib-src
parentfe243f8ee2cc2dde8920c097fffdbe0a4bdbf1bf (diff)
downloademacs-9997dc15294bb1d2daa1e578c180cd297d5d6f78.tar.gz
emacs-9997dc15294bb1d2daa1e578c180cd297d5d6f78.zip
(decode_options): Pass --display implicitly if -c
is specified. Only set tty if -t or -c is specified.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/emacsclient.c22
2 files changed, 17 insertions, 10 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index bc36dcb365d..b7d362e615a 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
12008-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacsclient.c (decode_options): Pass --display implicitly if -c
4 is specified. Only set tty if -t or -c is specified.
5
12008-02-04 Jason Rumney <jasonr@gnu.org> 62008-02-04 Jason Rumney <jasonr@gnu.org>
2 7
3 * makefile.w32-in (lisp1): Use (), not {}. 8 * makefile.w32-in (lisp1): Use (), not {}.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 707be43b5f7..cfa5fa00370 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -480,15 +480,6 @@ decode_options (argc, argv)
480{ 480{
481 alternate_editor = egetenv ("ALTERNATE_EDITOR"); 481 alternate_editor = egetenv ("ALTERNATE_EDITOR");
482 482
483 /* We used to set `display' to $DISPLAY by default, but this changed the
484 default behavior and is sometimes inconvenient. So instead of forcing
485 users to say "--display ''" when they want to use Emacs's existing tty
486 or display connection, we force them to use "--display $DISPLAY" if
487 they want Emacs to connect to their current display. */
488#if 0
489 display = egetenv ("DISPLAY");
490#endif
491
492 while (1) 483 while (1)
493 { 484 {
494 int opt = getopt_long (argc, argv, 485 int opt = getopt_long (argc, argv,
@@ -566,13 +557,24 @@ decode_options (argc, argv)
566 } 557 }
567 } 558 }
568 559
560 /* We used to set `display' to $DISPLAY by default, but this changed the
561 default behavior and is sometimes inconvenient. So instead of forcing
562 users to say "--display ''" when they want to use Emacs's existing tty
563 or display connection, we force them to use "--display $DISPLAY" if
564 they want Emacs to connect to their current display.
565 -c still implicitly passes --display $DISPLAY unless -t was specified
566 so as to try and mimick the behavior of `emacs' which either uses
567 the current tty or the current $DISPLAY. */
568 if (!current_frame && !tty)
569 display = egetenv ("DISPLAY");
570
569 if (display && strlen (display) == 0) 571 if (display && strlen (display) == 0)
570 display = NULL; 572 display = NULL;
571 573
572 if (!tty && display) 574 if (!tty && display)
573 window_system = 1; 575 window_system = 1;
574#if !defined (WINDOWSNT) && !defined (HAVE_CARBON) 576#if !defined (WINDOWSNT) && !defined (HAVE_CARBON)
575 else 577 else if (!current_frame)
576 tty = 1; 578 tty = 1;
577#endif 579#endif
578 580