summaryrefslogtreecommitdiff
path: root/doc/lispref/files.texi
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-12-03 16:59:42 +0200
committerEli Zaretskii <eliz@gnu.org>2015-12-03 16:59:42 +0200
commiteca277f937f4c51b83fa0f156b8081e88ea3f121 (patch)
treed762076988dc63596a07161e60924ea9d8e157d8 /doc/lispref/files.texi
parent4d10a7d467b6b0927036387c0d4849b2f40abcee (diff)
downloademacs-eca277f937f4c51b83fa0f156b8081e88ea3f121.tar.gz
Fix documentation and implementation of 'directory-name-p'
* lisp/files.el (directory-name-p): Modify to recognize backslashes on MS-Windows and MS-DOS. Adjust the doc string accordingly. Use '=', not char-equal, for comparison, as letter-case cannot possibly be an issue here. * doc/lispref/files.texi (Directory Names): Move the documentation of directory-name-p here from "Relative File Names". Update the description per the changes in implementation. * etc/NEWS: Move the entry for 'directory-name-p' to its proper place and mark it documented.
Diffstat (limited to 'doc/lispref/files.texi')
-rw-r--r--doc/lispref/files.texi12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index e8ed7ccd9f7..918bf5becbd 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2030,11 +2030,6 @@ form.
@end example
@end defun
-@defun directory-name-p filename
-This function returns non-@code{nil} if @var{filename} ends with a
-forward slash (@samp{/}) character.
-@end defun
-
@node Directory Names
@subsection Directory Names
@cindex directory name
@@ -2076,6 +2071,13 @@ string (if it does not already end in one).
@end example
@end defun
+@defun directory-name-p filename
+This function returns non-@code{nil} if @var{filename} ends with a
+directory separator character. This is the forward slash @samp{/} on
+Unix and GNU systems; MS-Windows and MS-DOS recognize both the forward
+slash and the backslash @samp{\} as directory separators.
+@end defun
+
@defun directory-file-name dirname
This function returns a string representing @var{dirname} in a form
that the operating system will interpret as the name of a file (a