changeset 73601:e243e9889b8b

[WINDOWSNT]: Force the first argv passed to execvp to point to alternate_editor (otherwise .BAT scripts can't run).
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 01 Nov 2006 19:26:14 +0000
parents fe1f7fc1d1d6
children 400169af8063
files lib-src/emacsclient.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/emacsclient.c	Wed Nov 01 15:16:22 2006 +0000
+++ b/lib-src/emacsclient.c	Wed Nov 01 19:26:14 2006 +0000
@@ -250,6 +250,9 @@
   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);