aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorJuanma Barranquero2007-05-21 12:15:52 +0000
committerJuanma Barranquero2007-05-21 12:15:52 +0000
commitc0f342ab438ed7d1a50dc34a29915b19e3bfd753 (patch)
tree3a5b2d4ca61bf05fb981a47a7ae590a056a3d79e /lib-src
parentc692d1d364b0fde72c4c1515e2ec09933df3d1e0 (diff)
downloademacs-c0f342ab438ed7d1a50dc34a29915b19e3bfd753.tar.gz
emacs-c0f342ab438ed7d1a50dc34a29915b19e3bfd753.zip
(print_help_and_exit): Restore and adapt trunk change from 2006-11-23 which was
lost in the merge.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 8e8cb9b379a..0356735ab6d 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -462,7 +462,7 @@ decode_options (argc, argv)
462 else 462 else
463 tty = 1; 463 tty = 1;
464#endif 464#endif
465 465
466 /* --no-wait implies --current-frame on ttys when there are file 466 /* --no-wait implies --current-frame on ttys when there are file
467 arguments or expressions given. */ 467 arguments or expressions given. */
468 if (nowait && tty && argc - optind > 0) 468 if (nowait && tty && argc - optind > 0)
@@ -482,27 +482,32 @@ decode_options (argc, argv)
482void 482void
483print_help_and_exit () 483print_help_and_exit ()
484{ 484{
485 /* Spaces and tabs are significant in this message; they're chosen so the
486 message aligns properly both in a tty and in a Windows message box.
487 Please try to preserve them; otherwise the output is very hard to read
488 when using emacsclientw. */
485 message (FALSE, 489 message (FALSE,
486 "Usage: %s [OPTIONS] FILE...\n\ 490 "Usage: %s [OPTIONS] FILE...\n\
487Tell the Emacs server to visit the specified files.\n\ 491Tell the Emacs server to visit the specified files.\n\
488Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\ 492Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\
489\n\ 493\n\
490The following OPTIONS are accepted:\n\ 494The following OPTIONS are accepted:\n\
491-V, --version Just print version info and return\n\ 495-V, --version Just print version info and return\n\
492-H, --help Print this usage information message\n\ 496-H, --help Print this usage information message\n\
493-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\
494-c, --current-frame Do not create a new frame; use the current Emacs frame\n\ 498-c, --current-frame Do not create a new frame;\n\
495-e, --eval Evaluate the FILE arguments as ELisp expressions\n\ 499 use the current Emacs frame\n\
496-n, --no-wait Don't wait for the server to return\n\ 500-e, --eval Evaluate the FILE arguments as ELisp expressions\n\
497-d, --display=DISPLAY Visit the file in the given display\n" 501-n, --no-wait Don't wait for the server to return\n\
502-d, --display=DISPLAY Visit the file in the given display\n"
498#ifndef NO_SOCKETS_IN_FILE_SYSTEM 503#ifndef NO_SOCKETS_IN_FILE_SYSTEM
499"-s, --socket-name=FILENAME\n\ 504"-s, --socket-name=FILENAME\n\
500 Set filename of the UNIX socket for communication\n" 505 Set filename of the UNIX socket for communication\n"
501#endif 506#endif
502"-f, --server-file=FILENAME\n\ 507"-f, --server-file=FILENAME\n\
503 Set filename of the TCP authentication file\n\ 508 Set filename of the TCP authentication file\n\
504-a, --alternate-editor=EDITOR\n\ 509-a, --alternate-editor=EDITOR\n\
505 Editor to fallback to if the server is not running\n\ 510 Editor to fallback to if the server is not running\n\
506\n\ 511\n\
507Report bugs to bug-gnu-emacs@gnu.org.\n", progname); 512Report bugs to bug-gnu-emacs@gnu.org.\n", progname);
508 exit (EXIT_SUCCESS); 513 exit (EXIT_SUCCESS);
@@ -538,7 +543,7 @@ main (argc, argv)
538 main_argv = argv; 543 main_argv = argv;
539 progname = argv[0]; 544 progname = argv[0];
540 message (TRUE, "%s: Sorry, the Emacs server is supported only\n" 545 message (TRUE, "%s: Sorry, the Emacs server is supported only\n"
541 "on systems with Berkeley sockets.\n", 546 "on systems with Berkeley sockets.\n",
542 argv[0]); 547 argv[0]);
543 fail (); 548 fail ();
544} 549}
@@ -976,7 +981,7 @@ handle_sigtstp (int signalnum)
976{ 981{
977 int old_errno = errno; 982 int old_errno = errno;
978 sigset_t set; 983 sigset_t set;
979 984
980 if (emacs_socket) 985 if (emacs_socket)
981 send_to_emacs (emacs_socket, "-suspend \n"); 986 send_to_emacs (emacs_socket, "-suspend \n");
982 987
@@ -1145,9 +1150,9 @@ HSOCKET
1145set_socket () 1150set_socket ()
1146{ 1151{
1147 HSOCKET s; 1152 HSOCKET s;
1148 1153
1149 INITIALIZE (); 1154 INITIALIZE ();
1150 1155
1151#ifndef NO_SOCKETS_IN_FILE_SYSTEM 1156#ifndef NO_SOCKETS_IN_FILE_SYSTEM
1152 /* Explicit --socket-name argument. */ 1157 /* Explicit --socket-name argument. */
1153 if (socket_name) 1158 if (socket_name)
@@ -1170,12 +1175,12 @@ set_socket ()
1170 s = set_tcp_socket (); 1175 s = set_tcp_socket ();
1171 if ((s != INVALID_SOCKET) || alternate_editor) 1176 if ((s != INVALID_SOCKET) || alternate_editor)
1172 return s; 1177 return s;
1173 1178
1174 message (TRUE, "%s: error accessing server file \"%s\"", 1179 message (TRUE, "%s: error accessing server file \"%s\"",
1175 progname, server_file); 1180 progname, server_file);
1176 exit (EXIT_FAILURE); 1181 exit (EXIT_FAILURE);
1177 } 1182 }
1178 1183
1179#ifndef NO_SOCKETS_IN_FILE_SYSTEM 1184#ifndef NO_SOCKETS_IN_FILE_SYSTEM
1180 /* Implicit local socket. */ 1185 /* Implicit local socket. */
1181 s = set_local_socket (); 1186 s = set_local_socket ();
@@ -1332,7 +1337,7 @@ main (argc, argv)
1332 1337
1333 if (current_frame) 1338 if (current_frame)
1334 send_to_emacs (emacs_socket, "-current-frame "); 1339 send_to_emacs (emacs_socket, "-current-frame ");
1335 1340
1336 if (display) 1341 if (display)
1337 { 1342 {
1338 send_to_emacs (emacs_socket, "-display "); 1343 send_to_emacs (emacs_socket, "-display ");