Mercurial > emacs
changeset 83045:8ca11496d25c
Changed emacsclient to open new frames by default.
lib-src/emacsclient.c (decode_options): Handle the case when $DISPLAY
is an empty string. Set window_system or tty to one by default,
depending on if there is a valid display.
(longopts, decode_options, print_help_and_exit): Removed -w, added -c.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-85
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Fri, 20 Feb 2004 01:46:26 +0000 |
parents | 52039abab942 |
children | 8ba4eb224be7 |
files | README.multi-tty lib-src/emacsclient.c |
diffstat | 2 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/README.multi-tty Fri Feb 20 01:22:10 2004 +0000 +++ b/README.multi-tty Fri Feb 20 01:46:26 2004 +0000 @@ -134,6 +134,10 @@ *** Emacsclient has been extended to support opening a new terminal frame (see -t option). +*** The behaviour of Emacsclient has been changed to open a new Emacs + frame by default. Use the -c option to get the old behavior of + opening files in the currently selected Emacs frame. + *** A make-frame-on-tty function has been added to make it easier to create frames on new terminals.
--- a/lib-src/emacsclient.c Fri Feb 20 01:22:10 2004 +0000 +++ b/lib-src/emacsclient.c Fri Feb 20 01:46:26 2004 +0000 @@ -95,7 +95,7 @@ { "help", no_argument, NULL, 'H' }, { "version", no_argument, NULL, 'V' }, { "tty", no_argument, NULL, 't' }, - { "window-system", no_argument, NULL, 'w' }, + { "current-frame", no_argument, NULL, 'c' }, { "alternate-editor", required_argument, NULL, 'a' }, { "socket-name", required_argument, NULL, 's' }, { "display", required_argument, NULL, 'd' }, @@ -112,11 +112,18 @@ { alternate_editor = getenv ("ALTERNATE_EDITOR"); display = getenv ("DISPLAY"); + if (strlen (display) == 0) + display = NULL; + + if (display) + window_system = 1; + else + tty = 1; while (1) { int opt = getopt_long (argc, argv, - "VHnea:s:d:tw", longopts, 0); + "VHnea:s:d:tc", longopts, 0); if (opt == EOF) break; @@ -158,8 +165,8 @@ window_system = 0; break; - case 'w': - window_system = 1; + case 'c': + window_system = 0; tty = 0; break; @@ -192,7 +199,7 @@ -V, --version Just print a version info and return\n\ -H, --help Print this usage information message\n\ -t, --tty Open a new Emacs frame on the current terminal\n\ --w, --window-system Open a new graphical Emacs frame\n\ +-c, --current-frame Do not create a new frame; use the current Emacs frame\n\ -n, --no-wait Don't wait for the server to return\n\ -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ -d, --display=DISPLAY Visit the file in the given display\n\