diff options
| author | Karoly Lorentey | 2003-12-30 19:27:57 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2003-12-30 19:27:57 +0000 |
| commit | 16c290d8c16fb0fdb574c837c6b1badbc655efe2 (patch) | |
| tree | 26e7915477ebe5b8c3847e70b9230a6efa134e6c /lib-src | |
| parent | 9d9f18127ffc1bc26358a5d48917ef4e4bafbddc (diff) | |
| download | emacs-16c290d8c16fb0fdb574c837c6b1badbc655efe2.tar.gz emacs-16c290d8c16fb0fdb574c837c6b1badbc655efe2.zip | |
Major bugfixes and slight enhancements.
src/dispextern.h (get_tty_size, tabs_safe_p, init_baud_rate): Update
prototypes.
src/dispnew.c (window_change_signal): Update call to get_tty_size.
src/frame.c (Fmake_terminal_frame): Ditto.
src/keyboard.c (Fsuspend_emacs): Ditto.
src/sysdep.c: Eliminate tty_outputs, wherever possible. (The
exceptions are init_sys_modes and reset_sys_modes, which need access
to tty-local parameters).
(init_baud_rate): Change tty_output parameter to a simple file descriptor.
(narrow_foreground_group, widen_foreground_group): Ditto.
(tabs_safe_p, get_tty_size): Ditto.
(init_sys_modes): Update narrow_foreground_group invocation.
(reset_sys_modes): Update widen_foreground_group invocation.
(request_sigio)[!FASYNC && STRIDE]: Fix function signature.
src/term.c (delete_tty): Only close output file handle if it is
different from input. Re-enable freeing of Wcm.
(term_init): Update get_tty_size, tabs_safe_p and init_baud_rate
invocations.
lib-src/emacsclient.c (here): Renamed to frame.
(longopts): Change --here to --frame. The -h short option may be
confused with --help.
(decode_options, print_help_and_exit): Update to reflect above changes.
(main): Ditto.
lisp/server.el (server-start): Fix frame-live-p call syntax.
(server-process-filter): Handle 'emacsclient -f' without file
arguments. Don't return any values to emacsclient when 'emacsclient
-f -e'.
(server-switch-buffer): Prevent infinite recursion when there are no
files to edit.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-27
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/emacsclient.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 174923e2dc8..9f08e4dac37 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -118,7 +118,7 @@ int eval = 0; | |||
| 118 | char *display = NULL; | 118 | char *display = NULL; |
| 119 | 119 | ||
| 120 | /* Nonzero means open a new Emacs frame on the current terminal. */ | 120 | /* Nonzero means open a new Emacs frame on the current terminal. */ |
| 121 | int here = 0; | 121 | int frame = 0; |
| 122 | 122 | ||
| 123 | /* If non-NULL, the name of an editor to fallback to if the server | 123 | /* If non-NULL, the name of an editor to fallback to if the server |
| 124 | is not running. --alternate-editor. */ | 124 | is not running. --alternate-editor. */ |
| @@ -135,7 +135,7 @@ struct option longopts[] = | |||
| 135 | { "eval", no_argument, NULL, 'e' }, | 135 | { "eval", no_argument, NULL, 'e' }, |
| 136 | { "help", no_argument, NULL, 'H' }, | 136 | { "help", no_argument, NULL, 'H' }, |
| 137 | { "version", no_argument, NULL, 'V' }, | 137 | { "version", no_argument, NULL, 'V' }, |
| 138 | { "here", no_argument, NULL, 'h' }, | 138 | { "frame", no_argument, NULL, 'f' }, |
| 139 | { "alternate-editor", required_argument, NULL, 'a' }, | 139 | { "alternate-editor", required_argument, NULL, 'a' }, |
| 140 | { "socket-name", required_argument, NULL, 's' }, | 140 | { "socket-name", required_argument, NULL, 's' }, |
| 141 | { "display", required_argument, NULL, 'd' }, | 141 | { "display", required_argument, NULL, 'd' }, |
| @@ -153,7 +153,7 @@ decode_options (argc, argv) | |||
| 153 | while (1) | 153 | while (1) |
| 154 | { | 154 | { |
| 155 | int opt = getopt_long (argc, argv, | 155 | int opt = getopt_long (argc, argv, |
| 156 | "VHnea:s:d:h", longopts, 0); | 156 | "VHnea:s:d:f", longopts, 0); |
| 157 | 157 | ||
| 158 | if (opt == EOF) | 158 | if (opt == EOF) |
| 159 | break; | 159 | break; |
| @@ -192,8 +192,8 @@ decode_options (argc, argv) | |||
| 192 | exit (0); | 192 | exit (0); |
| 193 | break; | 193 | break; |
| 194 | 194 | ||
| 195 | case 'h': | 195 | case 'f': |
| 196 | here = 1; | 196 | frame = 1; |
| 197 | break; | 197 | break; |
| 198 | 198 | ||
| 199 | case 'H': | 199 | case 'H': |
| @@ -207,7 +207,7 @@ decode_options (argc, argv) | |||
| 207 | } | 207 | } |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | if (here) { | 210 | if (frame) { |
| 211 | nowait = 0; | 211 | nowait = 0; |
| 212 | display = 0; | 212 | display = 0; |
| 213 | } | 213 | } |
| @@ -225,7 +225,7 @@ Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\ | |||
| 225 | The following OPTIONS are accepted:\n\ | 225 | The following OPTIONS are accepted:\n\ |
| 226 | -V, --version Just print a version info and return\n\ | 226 | -V, --version Just print a version info and return\n\ |
| 227 | -H, --help Print this usage information message\n\ | 227 | -H, --help Print this usage information message\n\ |
| 228 | -h, --here Open a new Emacs frame on the current terminal\n\ | 228 | -f, --frame Open a new Emacs frame on the current terminal\n\ |
| 229 | -n, --no-wait Don't wait for the server to return\n\ | 229 | -n, --no-wait Don't wait for the server to return\n\ |
| 230 | -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ | 230 | -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ |
| 231 | -d, --display=DISPLAY Visit the file in the given display\n\ | 231 | -d, --display=DISPLAY Visit the file in the given display\n\ |
| @@ -876,7 +876,7 @@ main (argc, argv) | |||
| 876 | /* Process options. */ | 876 | /* Process options. */ |
| 877 | decode_options (argc, argv); | 877 | decode_options (argc, argv); |
| 878 | 878 | ||
| 879 | if ((argc - optind < 1) && !eval && !here) | 879 | if ((argc - optind < 1) && !eval && !frame) |
| 880 | { | 880 | { |
| 881 | fprintf (stderr, "%s: file name or argument required\n", progname); | 881 | fprintf (stderr, "%s: file name or argument required\n", progname); |
| 882 | fprintf (stderr, "Try `%s --help' for more information\n", progname); | 882 | fprintf (stderr, "Try `%s --help' for more information\n", progname); |
| @@ -1048,7 +1048,7 @@ To start the server in Emacs, type \"M-x server-start\".\n", | |||
| 1048 | fprintf (out, " "); | 1048 | fprintf (out, " "); |
| 1049 | } | 1049 | } |
| 1050 | 1050 | ||
| 1051 | if (here) | 1051 | if (frame) |
| 1052 | { | 1052 | { |
| 1053 | if (! init_signals ()) | 1053 | if (! init_signals ()) |
| 1054 | { | 1054 | { |
| @@ -1108,7 +1108,7 @@ To start the server in Emacs, type \"M-x server-start\".\n", | |||
| 1108 | } | 1108 | } |
| 1109 | else | 1109 | else |
| 1110 | { | 1110 | { |
| 1111 | if (!here) | 1111 | if (!frame) |
| 1112 | { | 1112 | { |
| 1113 | while ((str = fgets (string, BUFSIZ, stdin))) | 1113 | while ((str = fgets (string, BUFSIZ, stdin))) |
| 1114 | { | 1114 | { |
| @@ -1128,7 +1128,7 @@ To start the server in Emacs, type \"M-x server-start\".\n", | |||
| 1128 | return 0; | 1128 | return 0; |
| 1129 | } | 1129 | } |
| 1130 | 1130 | ||
| 1131 | if (here) | 1131 | if (frame) |
| 1132 | { | 1132 | { |
| 1133 | if (! pty_conversation (out)) | 1133 | if (! pty_conversation (out)) |
| 1134 | { | 1134 | { |