From 0ebec7d35c363197865d0d4ba7fdfb9eda221b3b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Jan 2008 15:50:33 +0000 Subject: [PATCH] (decode_options) [WINDOWSNT]: Don't use the value of DISPLAY in the environment. Don't support -d. (print_help_and_exit) [WINDOWSNT]: Don't show the --display option. (longopts) [WINDOWSNT]: Remove --display. --- lib-src/ChangeLog | 7 +++++++ lib-src/emacsclient.c | 12 ++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index c7c6d3076cc..07d73545468 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,10 @@ +2008-01-12 Eli Zaretskii + + * emacsclient.c (decode_options) [WINDOWSNT]: Don't use the value + of DISPLAY in the environment. Don't support -d. + (print_help_and_exit) [WINDOWSNT]: Don't show the --display option. + (longopts) [WINDOWSNT]: Remove --display. + 2008-01-10 Chong Yidong * pop.c (pop_stat, pop_last): Check validity of string-to-integer diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 4fcd3398bd2..568b6c18119 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -170,7 +170,9 @@ struct option longopts[] = { "socket-name", required_argument, NULL, 's' }, #endif { "server-file", required_argument, NULL, 'f' }, +#ifndef WINDOWSNT { "display", required_argument, NULL, 'd' }, +#endif { 0, 0, 0, 0 } }; @@ -477,9 +479,11 @@ decode_options (argc, argv) char **argv; { alternate_editor = egetenv ("ALTERNATE_EDITOR"); +#ifndef WINDOWSNT display = egetenv ("DISPLAY"); if (display && strlen (display) == 0) display = NULL; +#endif while (1) { @@ -515,9 +519,11 @@ decode_options (argc, argv) server_file = optarg; break; +#ifndef WINDOWSNT case 'd': display = optarg; break; +#endif case 'n': nowait = 1; @@ -594,8 +600,10 @@ The following OPTIONS are accepted:\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\ --n, --no-wait Don't wait for the server to return\n\ --d, --display=DISPLAY Visit the file in the given display\n" +-n, --no-wait Don't wait for the server to return\n" +#ifndef WINDOWSNT +"-d, --display=DISPLAY Visit the file in the given display\n" +#endif #ifndef NO_SOCKETS_IN_FILE_SYSTEM "-s, --socket-name=FILENAME\n\ Set filename of the UNIX socket for communication\n" -- 2.39.5