aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-08-06 01:41:08 +0000
committerRichard M. Stallman2003-08-06 01:41:08 +0000
commit1c7cdff5dde95314d6c38d53c31e0b192b861c62 (patch)
tree6ed8f6ca8fa107e63abfa82012b665f857f44802
parentd5c99c9e67868bc75371756c4c0e79733c3f0875 (diff)
downloademacs-1c7cdff5dde95314d6c38d53c31e0b192b861c62.tar.gz
emacs-1c7cdff5dde95314d6c38d53c31e0b192b861c62.zip
(Reading File Names): read-file-name has new arg PREDICATE.
New function read-directory-name.
-rw-r--r--lispref/minibuf.texi12
1 files changed, 11 insertions, 1 deletions
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi
index 573191c6781..8d5c4522c7b 100644
--- a/lispref/minibuf.texi
+++ b/lispref/minibuf.texi
@@ -1083,7 +1083,7 @@ predicate @code{user-variable-p} instead of @code{commandp}:
1083file name. It provides special features including automatic insertion 1083file name. It provides special features including automatic insertion
1084of the default directory. 1084of the default directory.
1085 1085
1086@defun read-file-name prompt &optional directory default existing initial 1086@defun read-file-name prompt &optional directory default existing initial predicate
1087This function reads a file name in the minibuffer, prompting with 1087This function reads a file name in the minibuffer, prompting with
1088@var{prompt} and providing completion. If @var{default} is 1088@var{prompt} and providing completion. If @var{default} is
1089non-@code{nil}, then the function returns @var{default} if the user just 1089non-@code{nil}, then the function returns @var{default} if the user just
@@ -1112,6 +1112,11 @@ case, point goes at the beginning of @var{initial}. The default for
1112@var{initial} does, try the command @kbd{C-x C-v}. @strong{Note:} we 1112@var{initial} does, try the command @kbd{C-x C-v}. @strong{Note:} we
1113recommend using @var{default} rather than @var{initial} in most cases. 1113recommend using @var{default} rather than @var{initial} in most cases.
1114 1114
1115If @var{predicate} is non-@code{nil}, it specifies a function of one
1116argument that decides which file names are acceptable completion
1117possibilities. A file name is an acceptable value if @var{predicate}
1118returns non-@code{nil} for it.
1119
1115Here is an example: 1120Here is an example:
1116 1121
1117@example 1122@example
@@ -1146,6 +1151,11 @@ If the user types @key{RET}, @code{read-file-name} returns the file name
1146as the string @code{"/gp/gnu/elisp/manual.texi"}. 1151as the string @code{"/gp/gnu/elisp/manual.texi"}.
1147@end defun 1152@end defun
1148 1153
1154@defun read-directory-name prompt &optional directory default existing initial
1155This function is like @code{read-file-name} but allows only directory
1156names as completion possibilities.
1157@end defun
1158
1149@defopt insert-default-directory 1159@defopt insert-default-directory
1150This variable is used by @code{read-file-name}. Its value controls 1160This variable is used by @code{read-file-name}. Its value controls
1151whether @code{read-file-name} starts by placing the name of the default 1161whether @code{read-file-name} starts by placing the name of the default