diff options
| author | Richard M. Stallman | 2003-08-06 01:41:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-08-06 01:41:08 +0000 |
| commit | 1c7cdff5dde95314d6c38d53c31e0b192b861c62 (patch) | |
| tree | 6ed8f6ca8fa107e63abfa82012b665f857f44802 | |
| parent | d5c99c9e67868bc75371756c4c0e79733c3f0875 (diff) | |
| download | emacs-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.texi | 12 |
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}: | |||
| 1083 | file name. It provides special features including automatic insertion | 1083 | file name. It provides special features including automatic insertion |
| 1084 | of the default directory. | 1084 | of 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 |
| 1087 | This function reads a file name in the minibuffer, prompting with | 1087 | This 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 |
| 1089 | non-@code{nil}, then the function returns @var{default} if the user just | 1089 | non-@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 |
| 1113 | recommend using @var{default} rather than @var{initial} in most cases. | 1113 | recommend using @var{default} rather than @var{initial} in most cases. |
| 1114 | 1114 | ||
| 1115 | If @var{predicate} is non-@code{nil}, it specifies a function of one | ||
| 1116 | argument that decides which file names are acceptable completion | ||
| 1117 | possibilities. A file name is an acceptable value if @var{predicate} | ||
| 1118 | returns non-@code{nil} for it. | ||
| 1119 | |||
| 1115 | Here is an example: | 1120 | Here 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 | |||
| 1146 | as the string @code{"/gp/gnu/elisp/manual.texi"}. | 1151 | as 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 | ||
| 1155 | This function is like @code{read-file-name} but allows only directory | ||
| 1156 | names as completion possibilities. | ||
| 1157 | @end defun | ||
| 1158 | |||
| 1149 | @defopt insert-default-directory | 1159 | @defopt insert-default-directory |
| 1150 | This variable is used by @code{read-file-name}. Its value controls | 1160 | This variable is used by @code{read-file-name}. Its value controls |
| 1151 | whether @code{read-file-name} starts by placing the name of the default | 1161 | whether @code{read-file-name} starts by placing the name of the default |