diff options
| author | Paul Eggert | 2011-06-25 11:31:36 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-25 11:31:36 -0700 |
| commit | 948b98fd3c17e56b5fa606eedbe6487091f2b66d (patch) | |
| tree | 470d98f5aa36d512902da3db4d9f35b3c0fe6f07 /lib-src | |
| parent | 7a7ef429182915745380c3074771d9f747dab964 (diff) | |
| parent | 11fdef7d0cf3ef1ce30d1cd09ca9ca9a2b099d20 (diff) | |
| download | emacs-948b98fd3c17e56b5fa606eedbe6487091f2b66d.tar.gz emacs-948b98fd3c17e56b5fa606eedbe6487091f2b66d.zip | |
Merge from trunk.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 9 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 21 |
2 files changed, 28 insertions, 2 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index ec123e85036..b7a95fe8043 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-06-25 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacsclient.c (decode_options) <opt>: Add `F:'. | ||
| 4 | (print_help_and_exit): Mention --frame-parameters. | ||
| 5 | |||
| 6 | 2011-06-25 Andreas Rottmann <a.rottmann@gmx.at> | ||
| 7 | |||
| 8 | * emacsclient.c (longopts, decode_options, main): Add frame-parameters. | ||
| 9 | |||
| 1 | 2011-06-10 Paul Eggert <eggert@cs.ucla.edu> | 10 | 2011-06-10 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 11 | ||
| 3 | * movemail.c: Fix race condition and related bugs (Bug#8836). | 12 | * movemail.c: Fix race condition and related bugs (Bug#8836). |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index c334fb6a196..2daed7eb9da 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -160,6 +160,10 @@ const char *server_file = NULL; | |||
| 160 | /* PID of the Emacs server process. */ | 160 | /* PID of the Emacs server process. */ |
| 161 | int emacs_pid = 0; | 161 | int emacs_pid = 0; |
| 162 | 162 | ||
| 163 | /* If non-NULL, a string that should form a frame parameter alist to | ||
| 164 | be used for the new frame */ | ||
| 165 | const char *frame_parameters = NULL; | ||
| 166 | |||
| 163 | static void print_help_and_exit (void) NO_RETURN; | 167 | static void print_help_and_exit (void) NO_RETURN; |
| 164 | static void fail (void) NO_RETURN; | 168 | static void fail (void) NO_RETURN; |
| 165 | 169 | ||
| @@ -175,6 +179,7 @@ struct option longopts[] = | |||
| 175 | { "nw", no_argument, NULL, 't' }, | 179 | { "nw", no_argument, NULL, 't' }, |
| 176 | { "create-frame", no_argument, NULL, 'c' }, | 180 | { "create-frame", no_argument, NULL, 'c' }, |
| 177 | { "alternate-editor", required_argument, NULL, 'a' }, | 181 | { "alternate-editor", required_argument, NULL, 'a' }, |
| 182 | { "frame-parameters", required_argument, NULL, 'F' }, | ||
| 178 | #ifndef NO_SOCKETS_IN_FILE_SYSTEM | 183 | #ifndef NO_SOCKETS_IN_FILE_SYSTEM |
| 179 | { "socket-name", required_argument, NULL, 's' }, | 184 | { "socket-name", required_argument, NULL, 's' }, |
| 180 | #endif | 185 | #endif |
| @@ -526,9 +531,9 @@ decode_options (int argc, char **argv) | |||
| 526 | { | 531 | { |
| 527 | int opt = getopt_long_only (argc, argv, | 532 | int opt = getopt_long_only (argc, argv, |
| 528 | #ifndef NO_SOCKETS_IN_FILE_SYSTEM | 533 | #ifndef NO_SOCKETS_IN_FILE_SYSTEM |
| 529 | "VHneqa:s:f:d:tc", | 534 | "VHneqa:s:f:d:F:tc", |
| 530 | #else | 535 | #else |
| 531 | "VHneqa:f:d:tc", | 536 | "VHneqa:f:d:F:tc", |
| 532 | #endif | 537 | #endif |
| 533 | longopts, 0); | 538 | longopts, 0); |
| 534 | 539 | ||
| @@ -599,6 +604,10 @@ decode_options (int argc, char **argv) | |||
| 599 | print_help_and_exit (); | 604 | print_help_and_exit (); |
| 600 | break; | 605 | break; |
| 601 | 606 | ||
| 607 | case 'F': | ||
| 608 | frame_parameters = optarg; | ||
| 609 | break; | ||
| 610 | |||
| 602 | default: | 611 | default: |
| 603 | message (TRUE, "Try `%s --help' for more information\n", progname); | 612 | message (TRUE, "Try `%s --help' for more information\n", progname); |
| 604 | exit (EXIT_FAILURE); | 613 | exit (EXIT_FAILURE); |
| @@ -665,6 +674,7 @@ The following OPTIONS are accepted:\n\ | |||
| 665 | -nw, -t, --tty Open a new Emacs frame on the current terminal\n\ | 674 | -nw, -t, --tty Open a new Emacs frame on the current terminal\n\ |
| 666 | -c, --create-frame Create a new frame instead of trying to\n\ | 675 | -c, --create-frame Create a new frame instead of trying to\n\ |
| 667 | use the current Emacs frame\n\ | 676 | use the current Emacs frame\n\ |
| 677 | -F, --frame-parameters Set the parameters of a new frame\n\ | ||
| 668 | -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ | 678 | -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ |
| 669 | -n, --no-wait Don't wait for the server to return\n\ | 679 | -n, --no-wait Don't wait for the server to return\n\ |
| 670 | -q, --quiet Don't display messages on success\n\ | 680 | -q, --quiet Don't display messages on success\n\ |
| @@ -1630,6 +1640,13 @@ main (int argc, char **argv) | |||
| 1630 | send_to_emacs (emacs_socket, " "); | 1640 | send_to_emacs (emacs_socket, " "); |
| 1631 | } | 1641 | } |
| 1632 | 1642 | ||
| 1643 | if (frame_parameters && !current_frame) | ||
| 1644 | { | ||
| 1645 | send_to_emacs (emacs_socket, "-frame-parameters "); | ||
| 1646 | quote_argument (emacs_socket, frame_parameters); | ||
| 1647 | send_to_emacs (emacs_socket, " "); | ||
| 1648 | } | ||
| 1649 | |||
| 1633 | /* If using the current frame, send tty information to Emacs anyway. | 1650 | /* If using the current frame, send tty information to Emacs anyway. |
| 1634 | In daemon mode, Emacs may need to occupy this tty if no other | 1651 | In daemon mode, Emacs may need to occupy this tty if no other |
| 1635 | frame is available. */ | 1652 | frame is available. */ |