Mercurial > emacs
changeset 74688:29c73296a044
(File Name Completion): Document PREDICATE arg to file-name-completion.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 17 Dec 2006 20:13:13 +0000 |
parents | 9354f251fbae |
children | 2347e4b0bec2 |
files | lispref/files.texi |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lispref/files.texi Sun Dec 17 20:11:16 2006 +0000 +++ b/lispref/files.texi Sun Dec 17 20:13:13 2006 +0000 @@ -2232,10 +2232,13 @@ @end example @end defun -@defun file-name-completion filename directory +@defun file-name-completion filename directory &optional predicate This function completes the file name @var{filename} in directory @var{directory}. It returns the longest prefix common to all file names -in directory @var{directory} that start with @var{filename}. +in directory @var{directory} that start with @var{filename}. If +@var{predicate} is non-@code{nil} then it ignores possible completions +that don't satisfy @var{predicate}, after calling that function +with one argument, the expanded absolute file name. If only one match exists and @var{filename} matches it exactly, the function returns @code{t}. The function returns @code{nil} if directory