diff options
| author | Stefan Monnier | 2008-01-26 21:27:38 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-01-26 21:27:38 +0000 |
| commit | 0ea5797a183e5aaeb3be19ff8a95de0d28acd1c9 (patch) | |
| tree | e34850b130fa8a1bb3f93a8c0759fc580951d540 | |
| parent | f7317f6c66b56413263ab8d1efd14d85e7bf6561 (diff) | |
| download | emacs-0ea5797a183e5aaeb3be19ff8a95de0d28acd1c9.tar.gz emacs-0ea5797a183e5aaeb3be19ff8a95de0d28acd1c9.zip | |
(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.
| -rw-r--r-- | lib-src/ChangeLog | 6 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 19 |
2 files changed, 21 insertions, 4 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 7409d136527..9ebfbc29ecd 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-01-26 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacsclient.c (decode_options): Default to a NULL display, as Emacs-22. | ||
| 4 | Allow the -d option under w32 again, for those rare cases where it | ||
| 5 | actually does make sense. | ||
| 6 | |||
| 1 | 2008-01-25 Juanma Barranquero <lekktu@gmail.com> | 7 | 2008-01-25 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 8 | ||
| 3 | * emacsclient.c (set_tcp_socket): Don't send "\n" after | 9 | * emacsclient.c (set_tcp_socket): Don't send "\n" after |
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) | |||
| 479 | char **argv; | 479 | char **argv; |
| 480 | { | 480 | { |
| 481 | alternate_editor = egetenv ("ALTERNATE_EDITOR"); | 481 | alternate_editor = egetenv ("ALTERNATE_EDITOR"); |
| 482 | #ifndef WINDOWSNT | 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 | ||
| 483 | display = egetenv ("DISPLAY"); | 489 | display = egetenv ("DISPLAY"); |
| 484 | if (display && strlen (display) == 0) | ||
| 485 | display = NULL; | ||
| 486 | #endif | 490 | #endif |
| 487 | 491 | ||
| 488 | while (1) | 492 | while (1) |
| @@ -519,7 +523,11 @@ decode_options (argc, argv) | |||
| 519 | server_file = optarg; | 523 | server_file = optarg; |
| 520 | break; | 524 | break; |
| 521 | 525 | ||
| 522 | #ifndef WINDOWSNT | 526 | /* We used to disallow this argument in w32, but it seems better |
| 527 | to allow it, for the occasional case where the user is | ||
| 528 | connecting with a w32 client to a server compiled with X11 | ||
| 529 | support. */ | ||
| 530 | #if 1 /* !defined WINDOWS */ | ||
| 523 | case 'd': | 531 | case 'd': |
| 524 | display = optarg; | 532 | display = optarg; |
| 525 | break; | 533 | break; |
| @@ -558,6 +566,9 @@ decode_options (argc, argv) | |||
| 558 | } | 566 | } |
| 559 | } | 567 | } |
| 560 | 568 | ||
| 569 | if (display && strlen (display) == 0) | ||
| 570 | display = NULL; | ||
| 571 | |||
| 561 | if (!tty && display) | 572 | if (!tty && display) |
| 562 | window_system = 1; | 573 | window_system = 1; |
| 563 | #if !defined (WINDOWSNT) && !defined (HAVE_CARBON) | 574 | #if !defined (WINDOWSNT) && !defined (HAVE_CARBON) |