summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2006-11-01 19:26:14 +0000
committerJuanma Barranquero <lekktu@gmail.com>2006-11-01 19:26:14 +0000
commitb73ea44bb76b1b8b08ba6fea548107e20945413d (patch)
treed94d3dc7ac990ab025045ff65e6b464c00a4729a /lib-src/emacsclient.c
parent8ea882655e0cbf9022835df3c2cf1634be895057 (diff)
[WINDOWSNT]: Force the first argv passed to execvp to point to alternate_editor
(otherwise .BAT scripts can't run).
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r--lib-src/emacsclient.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index a155073c07..28e626f77d 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);