[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.
- [Emacs-diffs] emacs-26 updated (4b5711b -> 2b35ed0), Noam Postavsky, 2018/01/30
- [Emacs-diffs] emacs-26 9e6889c 1/8: Emphasize that GPG passphrase caching is temporary (Bug#29907), Noam Postavsky, 2018/01/30
- [Emacs-diffs] emacs-26 f706c59 5/8: Update manual description of locate-file (Bug#23650),
Noam Postavsky <=
- [Emacs-diffs] emacs-26 db6564c 7/8: Fix scroll-margin docstring (Bug#13791), Noam Postavsky, 2018/01/30
- [Emacs-diffs] emacs-26 607cc4e 2/8: Define cl-type-definition button type as needed (Bug#28899), Noam Postavsky, 2018/01/30
- [Emacs-diffs] emacs-26 53e9fa2 3/8: * lisp/custom.el (defcustom): Fix docstring (Bug#27891)., Noam Postavsky, 2018/01/30
- [Emacs-diffs] emacs-26 1602262 4/8: Clarify effect of print-gensym (Bug#27776), Noam Postavsky, 2018/01/30
- [Emacs-diffs] emacs-26 732d1b9 6/8: Clarify that `ansi-term' is almost the same as `term' (Bug#18106), Noam Postavsky, 2018/01/30
- [Emacs-diffs] emacs-26 2b35ed0 8/8: Document external-debugging-output in the Elisp Manual (Bug#24051), Noam Postavsky, 2018/01/30