aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJuri Linkov2007-10-22 00:30:11 +0000
committerJuri Linkov2007-10-22 00:30:11 +0000
commitc066bafa71c1bd20846a4c4ab60f65a42a4f9e9b (patch)
treee54ccd4974999dcfa584910448be4088b70de327 /doc
parenteabd84c93d40b8b182e65183faee011dde9a412f (diff)
downloademacs-c066bafa71c1bd20846a4c4ab60f65a42a4f9e9b.tar.gz
emacs-c066bafa71c1bd20846a4c4ab60f65a42a4f9e9b.zip
(Text from Minibuffer, Minibuffer Completion, High-Level Completion):
Document a list of default value strings in the DEFAULT argument, for which minibuffer functions return the first element.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog7
-rw-r--r--doc/lispref/minibuf.texi45
2 files changed, 33 insertions, 19 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index e0d9db962f9..164f8e27023 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,10 @@
12007-10-22 Juri Linkov <juri@jurta.org>
2
3 * minibuf.texi (Text from Minibuffer, Minibuffer Completion)
4 (High-Level Completion): Document a list of default value strings
5 in the DEFAULT argument, for which minibuffer functions return the
6 first element.
7
12007-10-17 Juri Linkov <juri@jurta.org> 82007-10-17 Juri Linkov <juri@jurta.org>
2 9
3 * text.texi (Filling): Update arguments of fill-paragraph. 10 * text.texi (Filling): Update arguments of fill-paragraph.
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 8252b42ca94..6561460d1f9 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -129,8 +129,8 @@ reads the text and returns the resulting Lisp object, unevaluated.
129(@xref{Input Functions}, for information about reading.) 129(@xref{Input Functions}, for information about reading.)
130 130
131The argument @var{default} specifies a default value to make available 131The argument @var{default} specifies a default value to make available
132through the history commands. It should be a string, or @code{nil}. 132through the history commands. It should be a string, a list of strings,
133If non-@code{nil}, the user can access it using 133or @code{nil}. If non-@code{nil}, the user can access its values using
134@code{next-history-element}, usually bound in the minibuffer to 134@code{next-history-element}, usually bound in the minibuffer to
135@kbd{M-n}. If @var{read} is non-@code{nil}, then @var{default} is 135@kbd{M-n}. If @var{read} is non-@code{nil}, then @var{default} is
136also used as the input to @code{read}, if the user enters empty input. 136also used as the input to @code{read}, if the user enters empty input.
@@ -176,8 +176,9 @@ The keymap used is @code{minibuffer-local-map}.
176The optional argument @var{default} is used as in 176The optional argument @var{default} is used as in
177@code{read-from-minibuffer}, except that, if non-@code{nil}, it also 177@code{read-from-minibuffer}, except that, if non-@code{nil}, it also
178specifies a default value to return if the user enters null input. As 178specifies a default value to return if the user enters null input. As
179in @code{read-from-minibuffer} it should be a string, or @code{nil}, 179in @code{read-from-minibuffer} it should be a string, a list of strings,
180which is equivalent to an empty string. 180or @code{nil}, which is equivalent to an empty string. When @var{default}
181is a list of strings, it returns the first element of this list.
181 182
182This function is a simplified interface to the 183This function is a simplified interface to the
183@code{read-from-minibuffer} function: 184@code{read-from-minibuffer} function:
@@ -190,7 +191,7 @@ This function is a simplified interface to the
190 (read-from-minibuffer @var{prompt} @var{initial} nil nil 191 (read-from-minibuffer @var{prompt} @var{initial} nil nil
191 @var{history} @var{default} @var{inherit}))) 192 @var{history} @var{default} @var{inherit})))
192 (if (and (equal value "") @var{default}) 193 (if (and (equal value "") @var{default})
193 @var{default} 194 (if (consp @var{default}) (car @var{default}) @var{default})
194 value)) 195 value))
195@end group 196@end group
196@end smallexample 197@end smallexample
@@ -840,9 +841,10 @@ input already in the buffer matches an element of @var{collection}.
840 841
841However, empty input is always permitted, regardless of the value of 842However, empty input is always permitted, regardless of the value of
842@var{require-match}; in that case, @code{completing-read} returns 843@var{require-match}; in that case, @code{completing-read} returns
843@var{default}, or @code{""}, if @var{default} is @code{nil}. The 844the first element of @var{default}, if it is a list, @code{""},
844value of @var{default} (if non-@code{nil}) is also available to the 845if @var{default} is @code{nil}, or @var{default}. The value of
845user through the history commands. 846@var{default} (if non-@code{nil}) is also available to the user
847through the history commands.
846 848
847The function @code{completing-read} uses 849The function @code{completing-read} uses
848@code{minibuffer-local-completion-map} as the keymap if 850@code{minibuffer-local-completion-map} as the keymap if
@@ -1073,8 +1075,10 @@ specification. @xref{Defining Commands}.
1073This function reads the name of a buffer and returns it as a string. 1075This function reads the name of a buffer and returns it as a string.
1074The argument @var{default} is the default name to use, the value to 1076The argument @var{default} is the default name to use, the value to
1075return if the user exits with an empty minibuffer. If non-@code{nil}, 1077return if the user exits with an empty minibuffer. If non-@code{nil},
1076it should be a string or a buffer. It is mentioned in the prompt, but 1078it should be a string, a list of strings, or a buffer. If it is
1077is not inserted in the minibuffer as initial input. 1079a list, the default value is the first element of this list. It is
1080mentioned in the prompt, but is not inserted in the minibuffer as
1081initial input.
1078 1082
1079The argument @var{prompt} should be a string ending with a colon and a 1083The argument @var{prompt} should be a string ending with a colon and a
1080space. If @var{default} is non-@code{nil}, the function inserts it in 1084space. If @var{default} is non-@code{nil}, the function inserts it in
@@ -1130,11 +1134,12 @@ which @code{commandp} returns @code{t}, and a command name is a symbol
1130for which @code{commandp} returns @code{t}. @xref{Interactive Call}. 1134for which @code{commandp} returns @code{t}. @xref{Interactive Call}.
1131 1135
1132The argument @var{default} specifies what to return if the user enters 1136The argument @var{default} specifies what to return if the user enters
1133null input. It can be a symbol or a string; if it is a string, 1137null input. It can be a symbol, a string or a list of strings. If it
1134@code{read-command} interns it before returning it. If @var{default} is 1138is a string, @code{read-command} interns it before returning it.
1135@code{nil}, that means no default has been specified; then if the user 1139If it is a list, @code{read-command} returns the first element of this list.
1136enters null input, the return value is @code{(intern "")}, that is, a 1140If @var{default} is @code{nil}, that means no default has been
1137symbol whose name is an empty string. 1141specified; then if the user enters null input, the return value is
1142@code{(intern "")}, that is, a symbol whose name is an empty string.
1138 1143
1139@example 1144@example
1140(read-command "Command name? ") 1145(read-command "Command name? ")
@@ -1177,10 +1182,12 @@ This function reads the name of a user variable and returns it as a
1177symbol. 1182symbol.
1178 1183
1179The argument @var{default} specifies what to return if the user enters 1184The argument @var{default} specifies what to return if the user enters
1180null input. It can be a symbol or a string; if it is a string, 1185null input. It can be a symbol, a string or a list of strings. If it
1181@code{read-variable} interns it before returning it. If @var{default} 1186is a string, @code{read-variable} interns it before returning it.
1182is @code{nil}, that means no default has been specified; then if the 1187If it is a list, @code{read-variable} returns the first element of
1183user enters null input, the return value is @code{(intern "")}. 1188this list. If @var{default} is @code{nil}, that means no default has
1189been specified; then if the user enters null input, the return value
1190is @code{(intern "")}.
1184 1191
1185@example 1192@example
1186@group 1193@group