diff options
| author | Andrew Innes | 1999-01-30 18:48:57 +0000 |
|---|---|---|
| committer | Andrew Innes | 1999-01-30 18:48:57 +0000 |
| commit | aa7b87b0b22bac620f917bf8678a9cf26078897f (patch) | |
| tree | 8d4372f4a5088e3a1f17bbf9708cbfeedbadbd8d /src | |
| parent | a3a58294d8500400bd346089e16662e7416c0cca (diff) | |
| download | emacs-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.c | 8 |
1 files changed, 6 insertions, 2 deletions
| @@ -639,7 +639,7 @@ char *get_emacs_configuration (void); | |||
| 639 | extern Lisp_Object Vsystem_configuration; | 639 | extern Lisp_Object Vsystem_configuration; |
| 640 | 640 | ||
| 641 | void | 641 | void |
| 642 | init_environment () | 642 | init_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 (); |