Index: emacs/lib-src/emacsclient.c =================================================================== RCS file: /cvsroot/emacs/emacs/lib-src/emacsclient.c,v retrieving revision 1.96 diff -c -r1.96 emacsclient.c *** emacs/lib-src/emacsclient.c 25 Nov 2006 00:32:40 -0000 1.96 --- emacs/lib-src/emacsclient.c 30 Nov 2006 04:50:55 -0000 *************** *** 113,118 **** --- 113,121 ---- /* Nonzero means don't wait for a response from Emacs. --no-wait. */ int nowait = 0; + /* Nonzero means don't display informational messages. --quiet. */ + int quiet = 0; + /* Nonzero means args are expressions to be evaluated. --eval. */ int eval = 0; *************** *** 134,139 **** --- 137,145 ---- struct option longopts[] = { { "no-wait", no_argument, NULL, 'n' }, + { "wait", no_argument, NULL, 'w' }, + { "quiet", no_argument, NULL, 'q' }, + { "verbose", no_argument, NULL, 'v' }, { "eval", no_argument, NULL, 'e' }, { "help", no_argument, NULL, 'H' }, { "version", no_argument, NULL, 'V' }, *************** *** 172,177 **** --- 178,185 ---- char *msg = buf; va_list args; + if (!is_error && quiet) return; + va_start (args, message); if (is_error) *************** *** 206,218 **** { alternate_editor = getenv ("ALTERNATE_EDITOR"); while (1) { int opt = getopt_long (argc, argv, #ifndef NO_SOCKETS_IN_FILE_SYSTEM ! "VHnea:s:f:d:", #else ! "VHnea:f:d:", #endif longopts, 0); --- 214,234 ---- { alternate_editor = getenv ("ALTERNATE_EDITOR"); + #ifdef WINDOWSNT + if (w32_window_app ()) + { + nowait = 1; + quiet = 1; + } + #endif + while (1) { int opt = getopt_long (argc, argv, #ifndef NO_SOCKETS_IN_FILE_SYSTEM ! "VHqvwnea:s:f:d:", #else ! "VHqvwnea:f:d:", #endif longopts, 0); *************** *** 248,258 **** --- 264,287 ---- nowait = 1; break; + case 'w': + nowait = 0; + break; + + case 'q': + quiet = 1; + break; + + case 'v': + quiet = 0; + break; + case 'e': eval = 1; break; case 'V': + quiet = 0; message (FALSE, "emacsclient %s\n", VERSION); exit (EXIT_SUCCESS); break; *************** *** 272,277 **** --- 301,307 ---- void print_help_and_exit () { + quiet = 0; message (FALSE, "Usage: %s [OPTIONS] FILE...\n\ Tell the Emacs server to visit the specified files.\n\ *************** *** 281,287 **** --- 311,320 ---- \n\ -V, --version Just print version info and return\n\ -H, --help Print this usage information message\n\ + -q, --quiet Do not display informational messages\n\ + -v, --verbose Display informational messages\n\ -e, --eval Evaluate FILE arguments as Lisp expressions\n\ + -w, --wait Wait for the server to return\n\ -n, --no-wait Don't wait for the server to return\n\ -d, --display=DISPLAY Visit the file in the given display\n" #ifndef NO_SOCKETS_IN_FILE_SYSTEM *************** *** 928,934 **** /* Maybe wait for an answer. */ if (!nowait) { ! if (!eval) { printf ("Waiting for Emacs..."); needlf = 2; --- 961,967 ---- /* Maybe wait for an answer. */ if (!nowait) { ! if (!eval && !quiet) { printf ("Waiting for Emacs..."); needlf = 2;