]> git.eshelyaron.com Git - emacs.git/commitdiff
(init_environment): Change argv[0] to contain the full path to Emacs.
authorAndrew Innes <andrewi@gnu.org>
Sat, 30 Jan 1999 18:48:57 +0000 (18:48 +0000)
committerAndrew Innes <andrewi@gnu.org>
Sat, 30 Jan 1999 18:48:57 +0000 (18:48 +0000)
src/w32.c

index d50cff56793ee1a2493c2fc9e729b2716587611a..865e2b00221d011489550e96c377734892b15772 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -639,7 +639,7 @@ char *get_emacs_configuration (void);
 extern Lisp_Object Vsystem_configuration;
 
 void
-init_environment ()
+init_environment (char ** argv)
 {
   int len;
   static const char * const tempdirs[] = {
@@ -758,7 +758,7 @@ init_environment ()
 
   {
     char *p;
-    char modname[MAX_PATH];
+    static char modname[MAX_PATH];
 
     if (!GetModuleFileName (NULL, modname, MAX_PATH))
       abort ();
@@ -767,6 +767,10 @@ init_environment ()
     *p = 0;
 
     SetCurrentDirectory (modname);
+
+    /* Ensure argv[0] has the full path to Emacs.  */
+    *p = '\\';
+    argv[0] = modname;
   }
 
   init_user_info ();