diff options
| author | Stefan Monnier | 2007-09-20 01:11:57 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-09-20 01:11:57 +0000 |
| commit | 31fa65956d94ab454ce82390c2d98b3709279794 (patch) | |
| tree | 09eb5ea77369078c1b945d69f14d99040b501555 /lib-src | |
| parent | 2a29c3c1ae8b75fc386f2cf3952cec653fe2cdb1 (diff) | |
| download | emacs-31fa65956d94ab454ce82390c2d98b3709279794.tar.gz emacs-31fa65956d94ab454ce82390c2d98b3709279794.zip | |
(current_frame): Change the default.
(longopts): Replace --current-frame by --create-frame.
(decode_options): Reverse the meaning of -c.
(print_help_and_exit): Update help text accordingly.
(main): Remove the -version and -good-version messages.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 37 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 21 |
2 files changed, 27 insertions, 31 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 5bc76e3a288..de2456af358 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2007-09-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacsclient.c (current_frame): Change the default. | ||
| 4 | (longopts): Replace --current-frame by --create-frame. | ||
| 5 | (decode_options): Reverse the meaning of -c. | ||
| 6 | (print_help_and_exit): Update help text accordingly. | ||
| 7 | (main): Remove the -version and -good-version messages. | ||
| 8 | |||
| 1 | 2007-09-12 Glenn Morris <rgm@gnu.org> | 9 | 2007-09-12 Glenn Morris <rgm@gnu.org> |
| 2 | 10 | ||
| 3 | * Makefile.in (SOURCES, unlock, relock): Delete. | 11 | * Makefile.in (SOURCES, unlock, relock): Delete. |
| @@ -13,8 +21,7 @@ | |||
| 13 | 21 | ||
| 14 | 2007-08-29 Jason Rumney <jasonr@gnu.org> | 22 | 2007-08-29 Jason Rumney <jasonr@gnu.org> |
| 15 | 23 | ||
| 16 | * emacsclient.c (SEND_STRING, SEND_QUOTED): Remove obfuscation | 24 | * emacsclient.c (SEND_STRING, SEND_QUOTED): Remove obfuscation macros. |
| 17 | macros. | ||
| 18 | (quote_argument, set_tcp_socket, handle_sigcont, handle_sigtstp): | 25 | (quote_argument, set_tcp_socket, handle_sigcont, handle_sigtstp): |
| 19 | (main): Expand removed macros inline. | 26 | (main): Expand removed macros inline. |
| 20 | (main) [WINDOWSNT]: Don't call ttyname. Don't recognize -suspend | 27 | (main) [WINDOWSNT]: Don't call ttyname. Don't recognize -suspend |
| @@ -25,10 +32,9 @@ | |||
| 25 | 32 | ||
| 26 | * emacsclient.c (signal.h): New include. | 33 | * emacsclient.c (signal.h): New include. |
| 27 | (sys/stat.h, errno.h): Always include, even on WINDOWSNT. | 34 | (sys/stat.h, errno.h): Always include, even on WINDOWSNT. |
| 28 | (DIRECTORY_SEP, IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP): Copy | 35 | (DIRECTORY_SEP, IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP): |
| 29 | definitions here from src/lisp.h. | 36 | Copy definitions here from src/lisp.h. |
| 30 | (main_argc, main_argv, current_frame, window_system, tty): New | 37 | (main_argc, main_argv, current_frame, window_system, tty): New vars. |
| 31 | variables. | ||
| 32 | (longopts): Add tty, current-frame. | 38 | (longopts): Add tty, current-frame. |
| 33 | (xmalloc, xstrdup): New functions. | 39 | (xmalloc, xstrdup): New functions. |
| 34 | (get_current_dir_name): New function, copied from src/sysdep.c. | 40 | (get_current_dir_name): New function, copied from src/sysdep.c. |
| @@ -54,10 +60,10 @@ | |||
| 54 | verification. If tty is set, check TERM, and pass name and type | 60 | verification. If tty is set, check TERM, and pass name and type |
| 55 | to Emacs. Pass window_system to Emacs. Move sending of eval to | 61 | to Emacs. Pass window_system to Emacs. Move sending of eval to |
| 56 | optind loop. Send -position, -file to Emacs. Call fsync after | 62 | optind loop. Send -position, -file to Emacs. Call fsync after |
| 57 | fflush. Check for a client/server version match. Handle | 63 | fflush. Check for a client/server version match. |
| 58 | -emacs-pid, -window-system-unsupported, -print, -error, -suspend | 64 | Handle -emacs-pid, -window-system-unsupported, -print, -error, and |
| 59 | commands. Don't exit prematurely on --no-wait, let Emacs close | 65 | -suspend commands. Don't exit prematurely on --no-wait, let Emacs |
| 60 | the connection for us. When creating a new frame, send | 66 | close the connection for us. When creating a new frame, send |
| 61 | environment and pwd to Emacs. Send current-frame to Emacs. | 67 | environment and pwd to Emacs. Send current-frame to Emacs. |
| 62 | 68 | ||
| 63 | 2007-08-25 Eli Zaretskii <eliz@gnu.org> | 69 | 2007-08-25 Eli Zaretskii <eliz@gnu.org> |
| @@ -378,8 +384,7 @@ | |||
| 378 | suggest using options to make them explicit. | 384 | suggest using options to make them explicit. |
| 379 | (AUTH_KEY_LENGTH, SEND_BUFFER_SIZE): New constants. | 385 | (AUTH_KEY_LENGTH, SEND_BUFFER_SIZE): New constants. |
| 380 | (send_buffer, sblen): New variables. | 386 | (send_buffer, sblen): New variables. |
| 381 | (send_to_emacs): New function to buffer output and send it with | 387 | (send_to_emacs): New function to buffer output and send it with `send'. |
| 382 | send(). | ||
| 383 | (quote_file_name): Use SEND_STRING. | 388 | (quote_file_name): Use SEND_STRING. |
| 384 | (close_winsock, initialize_sockets): New functions to load and | 389 | (close_winsock, initialize_sockets): New functions to load and |
| 385 | unload Winsock. | 390 | unload Winsock. |
| @@ -485,8 +490,8 @@ | |||
| 485 | 490 | ||
| 486 | 2006-05-23 Francesco Potort,Al(B <pot@gnu.org> | 491 | 2006-05-23 Francesco Potort,Al(B <pot@gnu.org> |
| 487 | 492 | ||
| 488 | * pop.c (pop_open, socket_connection, KPOP_SERVICE): Added | 493 | * pop.c (pop_open, socket_connection, KPOP_SERVICE): |
| 489 | comments explaining why the "kpop" service is never used. | 494 | Add comments explaining why the "kpop" service is never used. |
| 490 | 495 | ||
| 491 | 2006-05-13 Eli Zaretskii <eliz@gnu.org> | 496 | 2006-05-13 Eli Zaretskii <eliz@gnu.org> |
| 492 | 497 | ||
| @@ -594,7 +599,7 @@ | |||
| 594 | 599 | ||
| 595 | * makefile.w32-in (../src/config.h): Don't overwrite. Print a | 600 | * makefile.w32-in (../src/config.h): Don't overwrite. Print a |
| 596 | message instead. | 601 | message instead. |
| 597 | (../src/paths.h): Removed. | 602 | (../src/paths.h): Remove. |
| 598 | 603 | ||
| 599 | 2005-07-27 Juanma Barranquero <lekktu@gmail.com> | 604 | 2005-07-27 Juanma Barranquero <lekktu@gmail.com> |
| 600 | 605 | ||
| @@ -972,7 +977,7 @@ | |||
| 972 | 977 | ||
| 973 | 2003-01-06 Kim F. Storm <storm@cua.dk> | 978 | 2003-01-06 Kim F. Storm <storm@cua.dk> |
| 974 | 979 | ||
| 975 | * pop.c (__P): Renamed from _P to avoid problems on Cygwin. | 980 | * pop.c (__P): Rename from _P to avoid problems on Cygwin. |
| 976 | All uses changed. | 981 | All uses changed. |
| 977 | 982 | ||
| 978 | 2002-12-18 Andrew Innes <andrewi@gnu.org> | 983 | 2002-12-18 Andrew Innes <andrewi@gnu.org> |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index ae7ff12e17d..e098bc213b3 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -144,8 +144,8 @@ int nowait = 0; | |||
| 144 | /* Nonzero means args are expressions to be evaluated. --eval. */ | 144 | /* Nonzero means args are expressions to be evaluated. --eval. */ |
| 145 | int eval = 0; | 145 | int eval = 0; |
| 146 | 146 | ||
| 147 | /* Nonzero means don't open a new frame. --current-frame. */ | 147 | /* Nonzero means don't open a new frame. Inverse of --create-frame. */ |
| 148 | int current_frame = 0; | 148 | int current_frame = 1; |
| 149 | 149 | ||
| 150 | /* Nonzero means open a new graphical frame. */ | 150 | /* Nonzero means open a new graphical frame. */ |
| 151 | int window_system = 0; | 151 | int window_system = 0; |
| @@ -178,7 +178,7 @@ struct option longopts[] = | |||
| 178 | { "help", no_argument, NULL, 'H' }, | 178 | { "help", no_argument, NULL, 'H' }, |
| 179 | { "version", no_argument, NULL, 'V' }, | 179 | { "version", no_argument, NULL, 'V' }, |
| 180 | { "tty", no_argument, NULL, 't' }, | 180 | { "tty", no_argument, NULL, 't' }, |
| 181 | { "current-frame", no_argument, NULL, 'c' }, | 181 | { "create-frame", no_argument, NULL, 'c' }, |
| 182 | { "alternate-editor", required_argument, NULL, 'a' }, | 182 | { "alternate-editor", required_argument, NULL, 'a' }, |
| 183 | #ifndef NO_SOCKETS_IN_FILE_SYSTEM | 183 | #ifndef NO_SOCKETS_IN_FILE_SYSTEM |
| 184 | { "socket-name", required_argument, NULL, 's' }, | 184 | { "socket-name", required_argument, NULL, 's' }, |
| @@ -442,7 +442,7 @@ decode_options (argc, argv) | |||
| 442 | break; | 442 | break; |
| 443 | 443 | ||
| 444 | case 'c': | 444 | case 'c': |
| 445 | current_frame = 1; | 445 | current_frame = 0; |
| 446 | break; | 446 | break; |
| 447 | 447 | ||
| 448 | case 'H': | 448 | case 'H': |
| @@ -495,7 +495,7 @@ The following OPTIONS are accepted:\n\ | |||
| 495 | -V, --version Just print version info and return\n\ | 495 | -V, --version Just print version info and return\n\ |
| 496 | -H, --help Print this usage information message\n\ | 496 | -H, --help Print this usage information message\n\ |
| 497 | -t, --tty Open a new Emacs frame on the current terminal\n\ | 497 | -t, --tty Open a new Emacs frame on the current terminal\n\ |
| 498 | -c, --current-frame Do not create a new frame;\n\ | 498 | -c, --create-frame Create a new frame instead of trying to\n\ |
| 499 | use the current Emacs frame\n\ | 499 | use the current Emacs frame\n\ |
| 500 | -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ | 500 | -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ |
| 501 | -n, --no-wait Don't wait for the server to return\n\ | 501 | -n, --no-wait Don't wait for the server to return\n\ |
| @@ -1300,11 +1300,6 @@ main (argc, argv) | |||
| 1300 | w32_give_focus (); | 1300 | w32_give_focus (); |
| 1301 | #endif | 1301 | #endif |
| 1302 | 1302 | ||
| 1303 | /* First of all, send our version number for verification. */ | ||
| 1304 | send_to_emacs (emacs_socket, "-version "); | ||
| 1305 | send_to_emacs (emacs_socket, VERSION); | ||
| 1306 | send_to_emacs (emacs_socket, " "); | ||
| 1307 | |||
| 1308 | /* Send over our environment. */ | 1303 | /* Send over our environment. */ |
| 1309 | if (!current_frame) | 1304 | if (!current_frame) |
| 1310 | { | 1305 | { |
| @@ -1464,11 +1459,7 @@ main (argc, argv) | |||
| 1464 | while (p > string && *p == '\n') | 1459 | while (p > string && *p == '\n') |
| 1465 | *p-- = 0; | 1460 | *p-- = 0; |
| 1466 | 1461 | ||
| 1467 | if (strprefix ("-good-version ", string)) | 1462 | if (strprefix ("-emacs-pid ", string)) |
| 1468 | { | ||
| 1469 | /* -good-version: The versions match. */ | ||
| 1470 | } | ||
| 1471 | else if (strprefix ("-emacs-pid ", string)) | ||
| 1472 | { | 1463 | { |
| 1473 | /* -emacs-pid PID: The process id of the Emacs process. */ | 1464 | /* -emacs-pid PID: The process id of the Emacs process. */ |
| 1474 | emacs_pid = strtol (string + strlen ("-emacs-pid"), NULL, 10); | 1465 | emacs_pid = strtol (string + strlen ("-emacs-pid"), NULL, 10); |