aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/minibuf.texi53
1 files changed, 26 insertions, 27 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 121ac486d65..a79ce9aa7b2 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -56,17 +56,15 @@ read-only so you won't accidentally delete or change it. It is also
56marked as a field (@pxref{Fields}), so that certain motion functions, 56marked as a field (@pxref{Fields}), so that certain motion functions,
57including @code{beginning-of-line}, @code{forward-word}, 57including @code{beginning-of-line}, @code{forward-word},
58@code{forward-sentence}, and @code{forward-paragraph}, stop at the 58@code{forward-sentence}, and @code{forward-paragraph}, stop at the
59boundary between the prompt and the actual text. (In older Emacs 59boundary between the prompt and the actual text.
60versions, the prompt was displayed using a special mechanism and was not
61part of the buffer contents.)
62 60
63 The minibuffer's window is normally a single line; it grows 61 The minibuffer's window is normally a single line; it grows
64automatically if necessary if the contents require more space. You can 62automatically if the contents require more space. You can explicitly
65explicitly resize it temporarily with the window sizing commands; it 63resize it temporarily with the window sizing commands; it reverts to
66reverts to its normal size when the minibuffer is exited. You can 64its normal size when the minibuffer is exited. You can resize it
67resize it permanently by using the window sizing commands in the frame's 65permanently by using the window sizing commands in the frame's other
68other window, when the minibuffer is not active. If the frame contains 66window, when the minibuffer is not active. If the frame contains just
69just a minibuffer, you can change the minibuffer's size by changing the 67a minibuffer, you can change the minibuffer's size by changing the
70frame's size. 68frame's size.
71 69
72 Use of the minibuffer reads input events, and that alters the values 70 Use of the minibuffer reads input events, and that alters the values
@@ -74,16 +72,17 @@ of variables such as @code{this-command} and @code{last-command}
74(@pxref{Command Loop Info}). Your program should bind them around the 72(@pxref{Command Loop Info}). Your program should bind them around the
75code that uses the minibuffer, if you do not want that to change them. 73code that uses the minibuffer, if you do not want that to change them.
76 74
77 If a command uses a minibuffer while there is an active minibuffer, 75 Under some circumstances, a command can use a minibuffer even if
78this is called a @dfn{recursive minibuffer}. The first minibuffer is 76there is an active minibuffer; such minibuffers are called a
79named @w{@samp{ *Minibuf-0*}}. Recursive minibuffers are named by 77@dfn{recursive minibuffer}. The first minibuffer is named
80incrementing the number at the end of the name. (The names begin with a 78@w{ @samp{*Minibuf-0*}}. Recursive minibuffers are named by
81space so that they won't show up in normal buffer lists.) Of several 79incrementing the number at the end of the name. (The names begin with
82recursive minibuffers, the innermost (or most recently entered) is the 80a space so that they won't show up in normal buffer lists.) Of
83active minibuffer. We usually call this ``the'' minibuffer. You can 81several recursive minibuffers, the innermost (or most recently
84permit or forbid recursive minibuffers by setting the variable 82entered) is the active minibuffer. We usually call this ``the''
85@code{enable-recursive-minibuffers} or by putting properties of that 83minibuffer. You can permit or forbid recursive minibuffers by setting
86name on command symbols (@pxref{Recursive Mini}). 84the variable @code{enable-recursive-minibuffers}, or by putting
85properties of that name on command symbols (@xref{Recursive Mini}.
87 86
88 Like other buffers, a minibuffer uses a local keymap 87 Like other buffers, a minibuffer uses a local keymap
89(@pxref{Keymaps}) to specify special key bindings. The function that 88(@pxref{Keymaps}) to specify special key bindings. The function that
@@ -99,13 +98,13 @@ was supplied when Emacs was started.
99@node Text from Minibuffer 98@node Text from Minibuffer
100@section Reading Text Strings with the Minibuffer 99@section Reading Text Strings with the Minibuffer
101 100
102 Most often, the minibuffer is used to read text as a string. It can 101 The most basic primitive for minibuffer input is
103also be used to read a Lisp object in textual form. The most basic 102@code{read-from-minibuffer}, which can be used to read either a string
104primitive for minibuffer input is @code{read-from-minibuffer}; it can 103or a Lisp object in textual form. The function @code{read-regexp} is
105do either one. Regular expressions (@pxref{Regular Expressions}) are 104used for reading regular expressions (@pxref{Regular Expressions}),
106a special kind of strings; use @code{read-regexp} for their minibuffer 105which are a special kind of string. There are also specialized
107input. There are also specialized commands for reading commands, 106functions for reading commands, variables, file names, etc.@:
108variables, file names, etc.@: (@pxref{Completion}). 107(@pxref{Completion}).
109 108
110 In most cases, you should not call minibuffer input functions in the 109 In most cases, you should not call minibuffer input functions in the
111middle of a Lisp function. Instead, do all minibuffer input as part of 110middle of a Lisp function. Instead, do all minibuffer input as part of
@@ -113,7 +112,7 @@ reading the arguments for a command, in the @code{interactive}
113specification. @xref{Defining Commands}. 112specification. @xref{Defining Commands}.
114 113
115@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist default inherit-input-method 114@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist default inherit-input-method
116This function is the most general way to get input through the 115This function is the most general way to get input from the
117minibuffer. By default, it accepts arbitrary text and returns it as a 116minibuffer. By default, it accepts arbitrary text and returns it as a
118string; however, if @var{read} is non-@code{nil}, then it uses 117string; however, if @var{read} is non-@code{nil}, then it uses
119@code{read} to convert the text into a Lisp object (@pxref{Input 118@code{read} to convert the text into a Lisp object (@pxref{Input