aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Innes1999-01-30 18:48:57 +0000
committerAndrew Innes1999-01-30 18:48:57 +0000
commitaa7b87b0b22bac620f917bf8678a9cf26078897f (patch)
tree8d4372f4a5088e3a1f17bbf9708cbfeedbadbd8d /src
parenta3a58294d8500400bd346089e16662e7416c0cca (diff)
downloademacs-aa7b87b0b22bac620f917bf8678a9cf26078897f.tar.gz
emacs-aa7b87b0b22bac620f917bf8678a9cf26078897f.zip
(init_environment): Change argv[0] to contain the full path to Emacs.
Diffstat (limited to 'src')
-rw-r--r--src/w32.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/w32.c b/src/w32.c
index d50cff56793..865e2b00221 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -639,7 +639,7 @@ char *get_emacs_configuration (void);
639extern Lisp_Object Vsystem_configuration; 639extern Lisp_Object Vsystem_configuration;
640 640
641void 641void
642init_environment () 642init_environment (char ** argv)
643{ 643{
644 int len; 644 int len;
645 static const char * const tempdirs[] = { 645 static const char * const tempdirs[] = {
@@ -758,7 +758,7 @@ init_environment ()
758 758
759 { 759 {
760 char *p; 760 char *p;
761 char modname[MAX_PATH]; 761 static char modname[MAX_PATH];
762 762
763 if (!GetModuleFileName (NULL, modname, MAX_PATH)) 763 if (!GetModuleFileName (NULL, modname, MAX_PATH))
764 abort (); 764 abort ();
@@ -767,6 +767,10 @@ init_environment ()
767 *p = 0; 767 *p = 0;
768 768
769 SetCurrentDirectory (modname); 769 SetCurrentDirectory (modname);
770
771 /* Ensure argv[0] has the full path to Emacs. */
772 *p = '\\';
773 argv[0] = modname;
770 } 774 }
771 775
772 init_user_info (); 776 init_user_info ();