]> code.delx.au - gnu-emacs/commitdiff
Support invocation of un-installed runemacs.exe.
authorEli Zaretskii <eliz@gnu.org>
Fri, 17 May 2013 09:35:23 +0000 (12:35 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 17 May 2013 09:35:23 +0000 (12:35 +0300)
nt/ChangeLog
nt/runemacs.c

index ebda94e80f3b97553235ae914cb3183ac902001f..696d320c8bce42dc51189a85595a133af9857b45 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-17  Eli Zaretskii  <eliz@gnu.org>
+
+       * runemacs.c (WinMain): Support invocation of un-installed
+       nt/runemacs.exe, by looking for src/emacs.exe.
+
 2013-05-16  Eli Zaretskii  <eliz@gnu.org>
 
        * inc/stdint.h (SIZE_MAX) [!__GNUC__]: Define.  (Bug#14409)
index b090ffdd63907ac678859279f42600eff846b0d1..fd1524a9c416cbb246b063f980dbc1253af3cb25 100644 (file)
@@ -75,6 +75,11 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow)
   /* Quote executable name in case of spaces in the path. */
   *new_cmdline = '"';
   strcpy (new_cmdline + 1, modname);
+  /* Detect and handle un-installed runemacs.exe in nt/ subdirectory,
+     while emacs.exe is in src/.  */
+  if ((p = strrchr (new_cmdline, '\\')) != NULL
+      && stricmp (p, "\\nt") == 0)
+    strcpy (p, "\\src");
 
 #ifdef CHOOSE_NEWEST_EXE
   {