From: Juanma Barranquero Date: Wed, 1 Nov 2006 19:26:14 +0000 (+0000) Subject: [WINDOWSNT]: Force the first argv passed to execvp to point to alternate_editor X-Git-Tag: emacs-pretest-22.0.91~416 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b73ea44bb76b1b8b08ba6fea548107e20945413d;p=emacs.git [WINDOWSNT]: Force the first argv passed to execvp to point to alternate_editor (otherwise .BAT scripts can't run). --- diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index a155073c072..28e626f77d0 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -250,6 +250,9 @@ fail (argc, argv) if (alternate_editor) { int i = optind - 1; +#ifdef WINDOWSNT + argv[i] = (char *)alternate_editor; +#endif execvp (alternate_editor, argv + i); fprintf (stderr, "%s: error executing alternate editor \"%s\"\n", progname, alternate_editor);