diff options
| author | Chong Yidong | 2012-02-26 17:08:19 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-02-26 17:08:19 +0800 |
| commit | 9a4888c093e829c13f3dd27efd85331aeeb44696 (patch) | |
| tree | 6038ddfe8a945682cf84bd1e40c35430f41782b0 /doc | |
| parent | f0e751b92f2bdf4815607a5d4a2c4ab593315c9d (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 21 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 2 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-02-26 Glenn Morris <rgm@gnu.org> | 6 | 2012-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 |
| 1022 | This function return @code{t} if the files @var{file1} and @var{file2} name | 1022 | This function returns @code{t} if the files @var{file1} and |
| 1023 | the same file. | 1023 | @var{file2} name the same file. Two ordinary files are considered to |
| 1024 | Comparison is made with the @code{file-attributes} of both files. | 1024 | be the same if the function @code{file-attributes} (@xref{File |
| 1025 | Attributes}) 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 |
| 1028 | This function return @code{t} if directory @var{dir1} is a subdirectory | 1029 | This function returns @code{t} if directory @var{dir1} is a |
| 1029 | of @var{dir2} or if @var{dir1} and @var{dir2} are the same directory. | 1030 | subdirectory of @var{dir2}, or if @var{dir1} and @var{dir2} are the |
| 1030 | Arguments @var{dir1} and @var{dir2} must be existing directories, | 1031 | same directory. It compares the @code{file-truename} values of the |
| 1031 | otherwise, return nil. | 1032 | two directories (@pxref{Truenames}). If either @var{dir1} or |
| 1032 | Check is done by building a directory name based on equality of differents | 1033 | @var{dir2} do not name existing directories, the return value is |
| 1033 | components of both directory names, if this resulting directory name | 1034 | @code{nil}. |
| 1034 | is equal to @var{dir2}, we assume directory @var{dir1} | ||
| 1035 | is 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, | |||
| 1596 | and @var{set} is a function of one argument (a state) that sets it. | 1596 | and @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} |
| 1599 | This defines a single lisp form which is evaluated after the mode hooks | 1599 | This defines a single Lisp form which is evaluated after the mode hooks |
| 1600 | have run. It should not be quoted. | 1600 | have run. It should not be quoted. |
| 1601 | @end table | 1601 | @end table |
| 1602 | 1602 | ||