aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2016-11-14 09:08:06 -0800
committerPaul Eggert2016-11-14 09:09:48 -0800
commit2f5e0b1bf7b0ac4f450847db34d599a072020600 (patch)
treef653be0ce0b66b4e8c507f4e57a6a0bbca3ae142 /doc
parent3625e6ce9352942a4db980dd203b590cdaf821df (diff)
downloademacs-2f5e0b1bf7b0ac4f450847db34d599a072020600.tar.gz
emacs-2f5e0b1bf7b0ac4f450847db34d599a072020600.zip
Improve case-insensitive checks (Bug#24441)
* doc/lispref/files.texi (Truenames): Simplify documentation, to avoid giving too much platform-specific information that may not be accurate anyway. * src/fileio.c (file_name_case_insensitive_p): Use pathconf with _PC_CASE_SENSITIVE if _PC_CASE_INSENSITIVE is not available. Otherwise if one approach fails (e.g., with errno == EINVAL), fall back on an alternative rather than returning false. Try skipping the Darwin code, as it (1) no longer seems to be needed and (2) does not seem to match the Apple documentation. Leave in two alternatives conditionally compiled based on DARWIN_OS_CASE_SENSITIVE_FIXME in case (1) or (2) is incorrect.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/files.texi14
1 files changed, 3 insertions, 11 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 70c7177e064..ab0dcae2d9c 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1144,17 +1144,9 @@ return value is unspecified.
1144Sometimes file names or their parts need to be compared as strings, in 1144Sometimes file names or their parts need to be compared as strings, in
1145which case it's important to know whether the underlying filesystem is 1145which case it's important to know whether the underlying filesystem is
1146case-insensitive. This function returns @code{t} if file 1146case-insensitive. This function returns @code{t} if file
1147@var{filename} is on a case-insensitive filesystem. It always returns 1147@var{filename} is on a case-insensitive filesystem. On platforms where
1148@code{t} on MS-DOS and MS-Windows. On Cygwin and Mac OS X, 1148this information is not available, this function guesses based on
1149filesystems may or may not be case-insensitive, and the function tries 1149common practice.
1150to determine case-sensitivity by a runtime test. If the test is
1151inconclusive, the function returns @code{t} on Cygwin and @code{nil}
1152on Mac OS X.
1153
1154Currently this function always returns @code{nil} on platforms other
1155than MS-DOS, MS-Windows, Cygwin, and Mac OS X. It does not detect
1156case-insensitivity of mounted filesystems, such as Samba shares or
1157NFS-mounted Windows volumes.
1158@end defun 1150@end defun
1159 1151
1160@defun file-in-directory-p file dir 1152@defun file-in-directory-p file dir