diff options
| author | Paul Eggert | 2016-11-14 09:08:06 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-11-14 09:09:48 -0800 |
| commit | 2f5e0b1bf7b0ac4f450847db34d599a072020600 (patch) | |
| tree | f653be0ce0b66b4e8c507f4e57a6a0bbca3ae142 /doc | |
| parent | 3625e6ce9352942a4db980dd203b590cdaf821df (diff) | |
| download | emacs-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.texi | 14 |
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. | |||
| 1144 | Sometimes file names or their parts need to be compared as strings, in | 1144 | Sometimes file names or their parts need to be compared as strings, in |
| 1145 | which case it's important to know whether the underlying filesystem is | 1145 | which case it's important to know whether the underlying filesystem is |
| 1146 | case-insensitive. This function returns @code{t} if file | 1146 | case-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, | 1148 | this information is not available, this function guesses based on |
| 1149 | filesystems may or may not be case-insensitive, and the function tries | 1149 | common practice. |
| 1150 | to determine case-sensitivity by a runtime test. If the test is | ||
| 1151 | inconclusive, the function returns @code{t} on Cygwin and @code{nil} | ||
| 1152 | on Mac OS X. | ||
| 1153 | |||
| 1154 | Currently this function always returns @code{nil} on platforms other | ||
| 1155 | than MS-DOS, MS-Windows, Cygwin, and Mac OS X. It does not detect | ||
| 1156 | case-insensitivity of mounted filesystems, such as Samba shares or | ||
| 1157 | NFS-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 |