From dc1cd5f755dc04067d7b18eb8b647df876a2ad17 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 13 Oct 2008 02:32:51 +0000 Subject: [PATCH] (longopts, print_help_and_exit): Add -nw. (decode_options): Use getopt_long_only. --- lib-src/ChangeLog | 5 +++++ lib-src/emacsclient.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 255ed8d442..7883cf3b08 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2008-10-13 Dan Nicolaescu + + * emacsclient.c (longopts, print_help_and_exit): Add -nw. + (decode_options): Use getopt_long_only. + 2008-09-30 Eli Zaretskii * makefile.w32-in (OTHER_PLATFORM_SUPPORT): Remove ccl.elc and diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 93e36683f4..d4a7ad3d09 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -156,6 +156,7 @@ struct option longopts[] = { "help", no_argument, NULL, 'H' }, { "version", no_argument, NULL, 'V' }, { "tty", no_argument, NULL, 't' }, + { "nw", no_argument, NULL, 't' }, { "create-frame", no_argument, NULL, 'c' }, { "alternate-editor", required_argument, NULL, 'a' }, #ifndef NO_SOCKETS_IN_FILE_SYSTEM @@ -474,7 +475,7 @@ decode_options (argc, argv) while (1) { - int opt = getopt_long (argc, argv, + int opt = getopt_long_only (argc, argv, #ifndef NO_SOCKETS_IN_FILE_SYSTEM "VHnea:s:f:d:tc", #else @@ -601,7 +602,7 @@ Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\ The following OPTIONS are accepted:\n\ -V, --version Just print version info and return\n\ -H, --help Print this usage information message\n\ --t, --tty Open a new Emacs frame on the current terminal\n\ +-nw, -t, --tty Open a new Emacs frame on the current terminal\n\ -c, --create-frame Create a new frame instead of trying to\n\ use the current Emacs frame\n\ -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ -- 2.20.1