diff options
| author | Lars Ingebrigtsen | 2019-10-13 00:22:03 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-10-13 00:22:37 +0200 |
| commit | 5fffed6e88644cdf0a1d9fdaf728e75336e39ecd (patch) | |
| tree | 343a975be725e91c3ce06306b749eb0902edd66f | |
| parent | 914b98a1c690874382a31a4f3c27bda517dcd48b (diff) | |
| download | emacs-5fffed6e88644cdf0a1d9fdaf728e75336e39ecd.tar.gz emacs-5fffed6e88644cdf0a1d9fdaf728e75336e39ecd.zip | |
Document locate-dominating-file
* doc/lispref/files.texi (Contents of Directories): Document
locate-dominating-file (bug#33869).
| -rw-r--r-- | doc/lispref/files.texi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 3746c6d2c95..130282c582d 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -2924,6 +2924,7 @@ that can be read. | |||
| 2924 | @end defun | 2924 | @end defun |
| 2925 | 2925 | ||
| 2926 | @defun directory-files-recursively directory regexp &optional include-directories predicate follow-symlinks | 2926 | @defun directory-files-recursively directory regexp &optional include-directories predicate follow-symlinks |
| 2927 | @cindex recursing downwards in directories | ||
| 2927 | Return all files under @var{directory} whose names match @var{regexp}. | 2928 | Return all files under @var{directory} whose names match @var{regexp}. |
| 2928 | This function searches the specified @var{directory} and its | 2929 | This function searches the specified @var{directory} and its |
| 2929 | sub-directories, recursively, for files whose basenames (i.e., without | 2930 | sub-directories, recursively, for files whose basenames (i.e., without |
| @@ -2949,6 +2950,19 @@ Symbolic links to subdirectories are not followed by default, but if | |||
| 2949 | @var{follow-symlinks} is non-@code{nil}, they are followed. | 2950 | @var{follow-symlinks} is non-@code{nil}, they are followed. |
| 2950 | @end defun | 2951 | @end defun |
| 2951 | 2952 | ||
| 2953 | @defun locate-dominating-file file name | ||
| 2954 | @cindex recursing upwards in directories | ||
| 2955 | Starting at @var{file}, recurse up the directory hierarchy looking for | ||
| 2956 | the first directory where @var{name} exists, which is then the return | ||
| 2957 | value of this function. @var{file} can be a file or a directory. If | ||
| 2958 | it's a file, its directory will serve as the starting point for | ||
| 2959 | searching the hierarchy of directories. | ||
| 2960 | |||
| 2961 | @code{name} can be either a string or a predicate. The predicate | ||
| 2962 | takes one argument (the directory) and should return non-@code{nil} if | ||
| 2963 | we've found the directory we're looking for. | ||
| 2964 | @end defun | ||
| 2965 | |||
| 2952 | @defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format | 2966 | @defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format |
| 2953 | This is similar to @code{directory-files} in deciding which files | 2967 | This is similar to @code{directory-files} in deciding which files |
| 2954 | to report on and how to report their names. However, instead | 2968 | to report on and how to report their names. However, instead |