diff options
| author | Eli Zaretskii | 2016-11-28 17:43:25 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-11-28 17:43:25 +0200 |
| commit | 5878abf87b6b3ead1367cbae5cc6b0743349f611 (patch) | |
| tree | 83fef8ba83ca1733c6a95e3201db9be45558ba07 /src/w32term.c | |
| parent | 46065291fa0807a10180b958285f5d375cf05914 (diff) | |
| download | emacs-5878abf87b6b3ead1367cbae5cc6b0743349f611.tar.gz emacs-5878abf87b6b3ead1367cbae5cc6b0743349f611.zip | |
Fix 'expand-file-name' during startup on MS-Windows
* src/w32.c (w32_init_file_name_codepage): New function, resets
file_name_codepage and w32_ansi_code_page to undo the values
recorded during dumping.
(codepage_for_filenames): Fix an embarrassing typo. Ignore the
cached value of file-name encoding if it is nil, i.e. not
initialized yet. Actually cache the last used file-name encoding
to avoid calling APIs when not necessary.
* src/w32.h (w32_init_file_name_codepage): Add prototype.
* src/w32term.c (syms_of_w32term): Set the value of
w32_unicode_filenames according to the OS version. This avoids
resetting it during startup, which then causes temacs to run with
the incorrect value.
* src/emacs.c (main): Call w32_init_file_name_codepage early
during the startup.
* src/fileio.c (Fexpand_file_name) [WINDOWSNT]: Update 'newdir'
after converting $HOME to a UTF-8 string, so that 'newdirlim' is
consistent with it. (Bug#25038)
* lisp/international/mule-cmds.el (set-locale-environment): Set
'default-file-name-coding-system' to the ANSI codepage even in
non-interactive sessions.
* lisp/files.el (directory-abbrev-alist, abbreviated-home-dir):
Doc fix.
(abbreviate-file-name): Decode 'abbreviated-home-dir' if it is a
unibyte string.
* doc/lispref/files.texi (Directory Names): Index
'directory-abbrev-alist'.
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/w32term.c b/src/w32term.c index 51743f8f94d..7b74ae03ad0 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -7157,7 +7157,10 @@ specified by `file-name-coding-system'. | |||
| 7157 | This variable is set to non-nil by default when Emacs runs on Windows | 7157 | This variable is set to non-nil by default when Emacs runs on Windows |
| 7158 | systems of the NT family, including W2K, XP, Vista, Windows 7 and | 7158 | systems of the NT family, including W2K, XP, Vista, Windows 7 and |
| 7159 | Windows 8. It is set to nil on Windows 9X. */); | 7159 | Windows 8. It is set to nil on Windows 9X. */); |
| 7160 | w32_unicode_filenames = 0; | 7160 | if (os_subtype == OS_9X) |
| 7161 | w32_unicode_filenames = 0; | ||
| 7162 | else | ||
| 7163 | w32_unicode_filenames = 1; | ||
| 7161 | 7164 | ||
| 7162 | 7165 | ||
| 7163 | /* FIXME: The following variable will be (hopefully) removed | 7166 | /* FIXME: The following variable will be (hopefully) removed |