emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 f706c59 5/8: Update manual description of locate-


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-26 f706c59 5/8: Update manual description of locate-file (Bug#23650)
Date: Tue, 30 Jan 2018 22:35:03 -0500 (EST)

branch: emacs-26
commit f706c59093645a6306dd907833d597884e69c0ac
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Update manual description of locate-file (Bug#23650)
    
    * doc/lispref/files.texi (Locating Files): Add example of predicate
    when searching for a directory.
---
 doc/lispref/files.texi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index a5d0f9b..57428ab 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1541,6 +1541,16 @@ argument.  If @var{predicate} is @code{nil} or omitted,
 @xref{Kinds of Files}, for other useful predicates, e.g.,
 @code{file-executable-p} and @code{file-directory-p}.
 
+This function will normally skip directories, so if you want it to
+find directories, make sure the @var{predicate} function returns
address@hidden for them.  For example:
+
address@hidden
+(locate-file "html" '("/var/www" "/srv") nil
+             (lambda (f) (if (file-directory-p f) 'dir-ok)))
address@hidden example
+
+
 For compatibility, @var{predicate} can also be one of the symbols
 @code{executable}, @code{readable}, @code{writable}, @code{exists}, or
 a list of one or more of these symbols.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]