aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-12-07 18:51:33 +0200
committerEli Zaretskii2013-12-07 18:51:33 +0200
commit7df14908a304c99289eaa314987f65565f94f4df (patch)
tree538c44ef604c1e488682adafd3ab1c68d7dbd607
parent577c8624d0f51de542c584570917b96aa155b04f (diff)
downloademacs-7df14908a304c99289eaa314987f65565f94f4df.tar.gz
emacs-7df14908a304c99289eaa314987f65565f94f4df.zip
Updated documentation.
-rw-r--r--doc/emacs/mule.texi15
-rw-r--r--doc/lispref/nonascii.texi10
-rw-r--r--etc/NEWS8
-rw-r--r--src/fileio.c10
4 files changed, 41 insertions, 2 deletions
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index ebddc46be94..6efbc2b7190 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1130,6 +1130,21 @@ In the default language environment, non-@acronym{ASCII} characters in
1130file names are not encoded specially; they appear in the file system 1130file names are not encoded specially; they appear in the file system
1131using the internal Emacs representation. 1131using the internal Emacs representation.
1132 1132
1133@cindex file-name encoding, MS-Windows
1134@vindex w32-unicode-filenames
1135 When Emacs runs on MS-Windows versions that are descendants of the
1136NT family (Windows 2000, XP, Vista, Windows 7, and Windows 8), the
1137value of @code{file-name-coding-system} is largely ignored, as Emacs
1138by default uses APIs that allow to pass Unicode file names directly.
1139By contrast, on Windows 9X, file names are encoded using
1140@code{file-name-coding-system}, which should be set to the codepage
1141(@pxref{Coding Systems, codepage}) pertinent for the current system
1142locale. The value of the variable @code{w32-unicode-filenames}
1143controls whether Emacs uses the Unicode APIs when it calls OS
1144functions that accept file names. This variable is set by the startup
1145code to @code{nil} on Windows 9X, and to @code{t} on newer versions of
1146MS-Windows.
1147
1133 @strong{Warning:} if you change @code{file-name-coding-system} (or the 1148 @strong{Warning:} if you change @code{file-name-coding-system} (or the
1134language environment) in the middle of an Emacs session, problems can 1149language environment) in the middle of an Emacs session, problems can
1135result if you have already visited files whose names were encoded using 1150result if you have already visited files whose names were encoded using
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 96adb629f37..4132c1f8de0 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1108,6 +1108,16 @@ visited file name, saving may use the wrong file name, or it may get
1108an error. If such a problem happens, use @kbd{C-x C-w} to specify a 1108an error. If such a problem happens, use @kbd{C-x C-w} to specify a
1109new file name for that buffer. 1109new file name for that buffer.
1110 1110
1111@cindex file-name encoding, MS-Windows
1112 On Windows 2000 and later, Emacs by default uses Unicode APIs to
1113pass file names to the OS, so the value of
1114@code{file-name-coding-system} is largely ignored. Lisp applications
1115that need to encode or decode file names on the Lisp level should use
1116@code{utf-8} coding-system when @code{system-type} is
1117@code{windows-nt}; the conversion of UTF-8 encoded file names to the
1118encoding appropriate for communicating with the OS is performed
1119internally by Emacs.
1120
1111@node Lisp and Coding Systems 1121@node Lisp and Coding Systems
1112@subsection Coding Systems in Lisp 1122@subsection Coding Systems in Lisp
1113 1123
diff --git a/etc/NEWS b/etc/NEWS
index 132c461b258..5f6cf12fb24 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -931,6 +931,14 @@ directories and will find the files in there automatically; there's no
931need to set any variables due to this change.) 931need to set any variables due to this change.)
932 932
933+++ 933+++
934** Emacs on Windows 2000 and later can now access files and directories
935whose names cannot be encoded in the current system codepage.
936
937The new variable `w32-unicode-filenames' controls this feature: if it
938is t, Emacs uses Unicode APIs to pass file names to system calls,
939which lifts the limitation of file names to the current locale.
940
941+++
934** The "generate a backtrace on fatal error" feature now works on MS Windows. 942** The "generate a backtrace on fatal error" feature now works on MS Windows.
935The backtrace is written to the 'emacs_backtrace.txt' file in the 943The backtrace is written to the 'emacs_backtrace.txt' file in the
936directory where Emacs was running. 944directory where Emacs was running.
diff --git a/src/fileio.c b/src/fileio.c
index e5347ce765a..a98ed6b9fa5 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5849,7 +5849,10 @@ syms_of_fileio (void)
5849 5849
5850 DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system, 5850 DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system,
5851 doc: /* Coding system for encoding file names. 5851 doc: /* Coding system for encoding file names.
5852If it is nil, `default-file-name-coding-system' (which see) is used. */); 5852If it is nil, `default-file-name-coding-system' (which see) is used.
5853
5854On MS-Windows, the value of this variable is largely ignored if
5855\`w32-unicode-filenames' (which see) is non-nil. */);
5853 Vfile_name_coding_system = Qnil; 5856 Vfile_name_coding_system = Qnil;
5854 5857
5855 DEFVAR_LISP ("default-file-name-coding-system", 5858 DEFVAR_LISP ("default-file-name-coding-system",
@@ -5860,7 +5863,10 @@ This variable is used only when `file-name-coding-system' is nil.
5860This variable is set/changed by the command `set-language-environment'. 5863This variable is set/changed by the command `set-language-environment'.
5861User should not set this variable manually, 5864User should not set this variable manually,
5862instead use `file-name-coding-system' to get a constant encoding 5865instead use `file-name-coding-system' to get a constant encoding
5863of file names regardless of the current language environment. */); 5866of file names regardless of the current language environment.
5867
5868On MS-Windows, the value of this variable is largely ignored if
5869\`w32-unicode-filenames' (which see) is non-nil. */);
5864 Vdefault_file_name_coding_system = Qnil; 5870 Vdefault_file_name_coding_system = Qnil;
5865 5871
5866 DEFSYM (Qformat_decode, "format-decode"); 5872 DEFSYM (Qformat_decode, "format-decode");