diff options
| author | Chong Yidong | 2012-04-20 16:48:50 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-20 16:48:50 +0800 |
| commit | c07a4c0b599e0debfb10acdf02ac6559b998a88a (patch) | |
| tree | f87bca47c21f04b43cca2347a21ed89c57b67958 /lib-src | |
| parent | 6cf2a23e297b8a57a70c2a1dab5aa28b73461b0b (diff) | |
| parent | 50e5ebca7edcf5299b89ff74499991de01e22046 (diff) | |
| download | emacs-c07a4c0b599e0debfb10acdf02ac6559b998a88a.tar.gz emacs-c07a4c0b599e0debfb10acdf02ac6559b998a88a.zip | |
Merge from emacs-24 branch
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 5 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 33 |
2 files changed, 17 insertions, 21 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 106b2c8faca..c76303d8fa2 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-20 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * emacsclient.c (decode_options): Move -t -n corner case handling | ||
| 4 | into server.el (Bug#11102). | ||
| 5 | |||
| 1 | 2012-04-18 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2012-04-18 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | configure: new option --enable-gcc-warnings (Bug#11207) | 8 | configure: new option --enable-gcc-warnings (Bug#11207) |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 05fd0f3515e..48b4384d487 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -638,32 +638,23 @@ decode_options (int argc, char **argv) | |||
| 638 | if (display && strlen (display) == 0) | 638 | if (display && strlen (display) == 0) |
| 639 | display = NULL; | 639 | display = NULL; |
| 640 | 640 | ||
| 641 | #ifdef WINDOWSNT | ||
| 642 | /* Emacs on Windows does not support GUI and console frames in the same | ||
| 643 | instance. So, it makes sense to treat the -t and -c options as | ||
| 644 | equivalent, and open a new frame regardless of whether the running | ||
| 645 | instance is GUI or console. Ideally, we would only set tty = 1 when | ||
| 646 | the instance is running in a console, but alas we don't know that. | ||
| 647 | The simplest workaround is to always ask for a tty frame, and let | ||
| 648 | server.el check whether it makes sense. */ | ||
| 649 | if (tty || !current_frame) | ||
| 650 | { | ||
| 651 | display = (const char *) ttyname (0); /* Arg is ignored. */ | ||
| 652 | current_frame = 0; | ||
| 653 | tty = 1; | ||
| 654 | } | ||
| 655 | #endif | ||
| 656 | |||
| 657 | /* If no display is available, new frames are tty frames. */ | 641 | /* If no display is available, new frames are tty frames. */ |
| 658 | if (!current_frame && !display) | 642 | if (!current_frame && !display) |
| 659 | tty = 1; | 643 | tty = 1; |
| 660 | 644 | ||
| 661 | /* --no-wait implies --current-frame on ttys when there are file | ||
| 662 | arguments or expressions given. */ | ||
| 663 | if (nowait && tty && argc - optind > 0) | ||
| 664 | current_frame = 1; | ||
| 665 | |||
| 666 | #ifdef WINDOWSNT | 645 | #ifdef WINDOWSNT |
| 646 | /* Emacs on Windows does not support graphical and text terminal | ||
| 647 | frames in the same instance. So, treat the -t and -c options as | ||
| 648 | equivalent, and open a new frame on the server's terminal. | ||
| 649 | Ideally, we would only set tty = 1 when the serve is running in a | ||
| 650 | console, but alas we don't know that. As a workaround, always | ||
| 651 | ask for a tty frame, and let server.el figure it out. */ | ||
| 652 | if (!current_frame) | ||
| 653 | { | ||
| 654 | display = NULL; | ||
| 655 | tty = 1; | ||
| 656 | } | ||
| 657 | |||
| 667 | if (alternate_editor && alternate_editor[0] == '\0') | 658 | if (alternate_editor && alternate_editor[0] == '\0') |
| 668 | { | 659 | { |
| 669 | message (TRUE, "--alternate-editor argument or ALTERNATE_EDITOR variable cannot be\n\ | 660 | message (TRUE, "--alternate-editor argument or ALTERNATE_EDITOR variable cannot be\n\ |