1044 |
it should be a string or a buffer. It is mentioned in the prompt, but |
it should be a string or a buffer. It is mentioned in the prompt, but |
1045 |
is not inserted in the minibuffer as initial input. |
is not inserted in the minibuffer as initial input. |
1046 |
|
|
1047 |
|
The argument @var{prompt} should be a string ending with a colon and a |
1048 |
|
space. If @var{default} is non-@code{nil}, the function inserts it in |
1049 |
|
@var{prompt} before the colon to follow the convention for reading from |
1050 |
|
the minibuffer with a default value (@pxref{Programming Tips}). |
1051 |
|
|
1052 |
If @var{existing} is non-@code{nil}, then the name specified must be |
If @var{existing} is non-@code{nil}, then the name specified must be |
1053 |
that of an existing buffer. The usual commands to exit the minibuffer |
that of an existing buffer. The usual commands to exit the minibuffer |
1054 |
do not exit if the text is not valid, and @key{RET} does completion to |
do not exit if the text is not valid, and @key{RET} does completion to |
1063 |
@samp{minibuffer.texi}, so that name is the value. |
@samp{minibuffer.texi}, so that name is the value. |
1064 |
|
|
1065 |
@example |
@example |
1066 |
(read-buffer "Buffer name? " "foo" t) |
(read-buffer "Buffer name: " "foo" t) |
1067 |
@group |
@group |
1068 |
;; @r{After evaluation of the preceding expression,} |
;; @r{After evaluation of the preceding expression,} |
1069 |
;; @r{the following prompt appears,} |
;; @r{the following prompt appears,} |
1072 |
|
|
1073 |
@group |
@group |
1074 |
---------- Buffer: Minibuffer ---------- |
---------- Buffer: Minibuffer ---------- |
1075 |
Buffer name? (default foo) @point{} |
Buffer name (default foo): @point{} |
1076 |
---------- Buffer: Minibuffer ---------- |
---------- Buffer: Minibuffer ---------- |
1077 |
@end group |
@end group |
1078 |
|
|