aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChong Yidong2012-02-26 17:08:19 +0800
committerChong Yidong2012-02-26 17:08:19 +0800
commit9a4888c093e829c13f3dd27efd85331aeeb44696 (patch)
tree6038ddfe8a945682cf84bd1e40c35430f41782b0 /doc
parentf0e751b92f2bdf4815607a5d4a2c4ab593315c9d (diff)
downloademacs-9a4888c093e829c13f3dd27efd85331aeeb44696.tar.gz
emacs-9a4888c093e829c13f3dd27efd85331aeeb44696.zip
Code and doc fixes for file-subdir-of-p and files-equal-p.
* lisp/files.el (files-equal-p): Doc fix. (file-subdir-of-p): Doc fix. Convert loop macro to plain Lisp, and quit the loop once a mismatch is found. * doc/lispref/files.texi (Kinds of Files): Improve documentation of files-equal-p and file-subdir-of-p.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/files.texi21
-rw-r--r--doc/lispref/modes.texi2
3 files changed, 16 insertions, 12 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index a339205a7fe..6d9cd6b4f8a 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12012-02-26 Chong Yidong <cyd@gnu.org>
2
3 * files.texi (Kinds of Files): Improve documentation of
4 files-equal-p and file-subdir-of-p.
5
12012-02-26 Glenn Morris <rgm@gnu.org> 62012-02-26 Glenn Morris <rgm@gnu.org>
2 7
3 * intro.texi (Acknowledgements): Small changes. 8 * intro.texi (Acknowledgements): Small changes.
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 1fee572a573..277a4cabdf1 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1019,20 +1019,19 @@ other I/O device).
1019@end defun 1019@end defun
1020 1020
1021@defun files-equal-p file1 file2 1021@defun files-equal-p file1 file2
1022This function return @code{t} if the files @var{file1} and @var{file2} name 1022This function returns @code{t} if the files @var{file1} and
1023the same file. 1023@var{file2} name the same file. Two ordinary files are considered to
1024Comparison is made with the @code{file-attributes} of both files. 1024be the same if the function @code{file-attributes} (@xref{File
1025Attributes}) returns @code{equal} values for them.
1025@end defun 1026@end defun
1026 1027
1027@defun file-subdir-of-p dir1 dir2 1028@defun file-subdir-of-p dir1 dir2
1028This function return @code{t} if directory @var{dir1} is a subdirectory 1029This function returns @code{t} if directory @var{dir1} is a
1029of @var{dir2} or if @var{dir1} and @var{dir2} are the same directory. 1030subdirectory of @var{dir2}, or if @var{dir1} and @var{dir2} are the
1030Arguments @var{dir1} and @var{dir2} must be existing directories, 1031same directory. It compares the @code{file-truename} values of the
1031otherwise, return nil. 1032two directories (@pxref{Truenames}). If either @var{dir1} or
1032Check is done by building a directory name based on equality of differents 1033@var{dir2} do not name existing directories, the return value is
1033components of both directory names, if this resulting directory name 1034@code{nil}.
1034is equal to @var{dir2}, we assume directory @var{dir1}
1035is a subdirectory of @var{dir2}.
1036@end defun 1035@end defun
1037 1036
1038@node Truenames 1037@node Truenames
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index a4ee6f8327f..eac895b6279 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1596,7 +1596,7 @@ where @var{get} is an expression that returns the current state,
1596and @var{set} is a function of one argument (a state) that sets it. 1596and @var{set} is a function of one argument (a state) that sets it.
1597 1597
1598@item :after-hook @var{after-hook} 1598@item :after-hook @var{after-hook}
1599This defines a single lisp form which is evaluated after the mode hooks 1599This defines a single Lisp form which is evaluated after the mode hooks
1600have run. It should not be quoted. 1600have run. It should not be quoted.
1601@end table 1601@end table
1602 1602