The minibuffer's window is normally a single line; it grows
automatically if the contents require more space. You can explicitly
+@c FIXME? Works in 23.4, not 24.0.95. (Bug#11276)
resize it temporarily with the window sizing commands; it reverts to
its normal size when the minibuffer is exited. You can resize it
+@c FIXME? Doesn't work in any version of Emacs?
permanently by using the window sizing commands in the frame's other
window, when the minibuffer is not active. If the frame contains just
a minibuffer, you can change the minibuffer's size by changing the
code that uses the minibuffer, if you do not want that to change them.
Under some circumstances, a command can use a minibuffer even if
-there is an active minibuffer; such minibuffers are called a
+there is an active minibuffer; such a minibuffer is called a
@dfn{recursive minibuffer}. The first minibuffer is named
-@w{@samp{ *Minibuf-0*}}. Recursive minibuffers are named by
+@w{@samp{ *Minibuf-1*}}. Recursive minibuffers are named by
incrementing the number at the end of the name. (The names begin with
a space so that they won't show up in normal buffer lists.) Of
several recursive minibuffers, the innermost (or most recently
minibuffer local maps. @xref{Completion Commands}, for the minibuffer
local maps for completion.
+@findex minibuffer-inactive-mode
+@vindex minibuffer-inactive-mode-map
+@cindex inactive minibuffer
+ When a minibuffer is inactive, it's major mode is
+@code{minibuffer-inactive-mode}, with keymap
+@code{minibuffer-inactive-mode-map}. This is only really useful if
+the minibuffer is in a separate frame. @xref{Minibuffers and Frames}.
+
When Emacs is running in batch mode, any request to read from the
minibuffer actually reads a line from the standard input descriptor that
was supplied when Emacs was started.
reading the arguments for a command, in the @code{interactive}
specification. @xref{Defining Commands}.
-@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist default inherit-input-method
+@defun read-from-minibuffer prompt &optional initial keymap read history default inherit-input-method
This function is the most general way to get input from the
minibuffer. By default, it accepts arbitrary text and returns it as a
string; however, if @var{read} is non-@code{nil}, then it uses
Functions}).
The first thing this function does is to activate a minibuffer and
-display it with @var{prompt-string} as the prompt. This value must be a
-string. Then the user can edit text in the minibuffer.
+display it with @var{prompt} (which must be a string) as the
+prompt. Then the user can edit text in the minibuffer.
When the user types a command to exit the minibuffer,
@code{read-from-minibuffer} constructs the return value from the text in
The argument @var{default} specifies default values to make available
through the history commands. It should be a string, a list of
strings, or @code{nil}. The string or strings become the minibuffer's
-``future history,'' available to the user with @kbd{M-n}.
+``future history'', available to the user with @kbd{M-n}.
If @var{read} is non-@code{nil}, then @var{default} is also used
as the input to @code{read}, if the user enters empty input.
a keymap is the most important way to customize the minibuffer for
various applications such as completion.
-The argument @var{hist} specifies which history list variable to use
+The argument @var{history} specifies a history list variable to use
for saving the input and for history commands used in the minibuffer.
-It defaults to @code{minibuffer-history}. @xref{Minibuffer History}.
+It defaults to @code{minibuffer-history}. You can optionally specify
+a starting position in the history list as well. @xref{Minibuffer History}.
If the variable @code{minibuffer-allow-text-properties} is
-non-@code{nil}, then the string which is returned includes whatever text
+non-@code{nil}, then the string that is returned includes whatever text
properties were present in the minibuffer. Otherwise all the text
properties are stripped when the value is returned.
Representations}) from whichever buffer was current before entering the
minibuffer.
-Use of @var{initial-contents} is mostly deprecated; we recommend using
+Use of @var{initial} is mostly deprecated; we recommend using
a non-@code{nil} value only in conjunction with specifying a cons cell
-for @var{hist}. @xref{Initial Input}.
+for @var{history}. @xref{Initial Input}.
@end defun
@defun read-string prompt &optional initial history default inherit-input-method
@code{read-from-minibuffer}, except that, if non-@code{nil}, it also
specifies a default value to return if the user enters null input. As
in @code{read-from-minibuffer} it should be a string, a list of
-strings, or @code{nil} which is equivalent to an empty string. When
+strings, or @code{nil}, which is equivalent to an empty string. When
@var{default} is a string, that string is the default value. When it
is a list of strings, the first string is the default value. (All
these strings are available to the user in the ``future minibuffer
-history.'')
+history''.)
This function works by calling the
@code{read-from-minibuffer} function:
@end smallexample
@end defun
-@defun read-regexp prompt &optional default-value
+@defun read-regexp prompt &optional default
This function reads a regular expression as a string from the
minibuffer and returns it. The argument @var{prompt} is used as in
@code{read-from-minibuffer}. The keymap used is
@code{minibuffer-local-map}, and @code{regexp-history} is used as the
history list (@pxref{Minibuffer History, regexp-history}).
-The optional argument @var{default-value} specifies a default value to
+The optional argument @var{default} specifies a default value to
return if the user enters null input; it should be a string, or
-@code{nil} which is equivalent to an empty string.
+@code{nil}, which is equivalent to an empty string.
In addition, @code{read-regexp} collects a few useful candidates for
input and passes them to @code{read-from-minibuffer}, to make them
@end defun
@defvar minibuffer-allow-text-properties
-If this variable is @code{nil}, then @code{read-from-minibuffer} strips
-all text properties from the minibuffer input before returning it.
-This variable also affects @code{read-string}. However,
+If this variable is @code{nil}, then @code{read-from-minibuffer}
+and @code{read-string} strip all text properties from the minibuffer
+input before returning it. However,
@code{read-no-blanks-input} (see below), as well as
@code{read-minibuffer} and related functions (@pxref{Object from
Minibuffer,, Reading Lisp Objects With the Minibuffer}), and all
@item @kbd{M-r}
@code{previous-matching-history-element}
+
+@ignore
+@c Does not seem worth/appropriate mentioning.
+@item @kbd{C-@key{TAB}}
+@code{file-cache-minibuffer-complete}
+@end ignore
@end table
@end defvar
@end smallexample
@end defun
+@c Slightly unfortunate name, suggesting it might be related to the
+@c Nextstep port...
@defvar minibuffer-local-ns-map
This built-in variable is the keymap used as the minibuffer local keymap
in the function @code{read-no-blanks-input}. By default, it makes the
kinds of inputs. It's the Lisp programmer's job to specify the right
history list for each use of the minibuffer.
- You specify a minibuffer history list with the optional @var{hist}
+ You specify a minibuffer history list with the optional @var{history}
argument to @code{read-from-minibuffer} or @code{completing-read}.
Here are the possible values for it:
symbol @var{variable}. @code{previous-history-element} will display
the most recent element of the history list in the minibuffer. If you
specify a positive @var{startpos}, the minibuffer history functions
-behave as if @code{(elt @var{variable} (1- @var{STARTPOS}))} were the
+behave as if @code{(elt @var{variable} (1- @var{startpos}))} were the
history element currently shown in the minibuffer.
For consistency, you should also specify that element of the history
to the minibuffer input function (@pxref{Initial Input}).
@end table
- If you don't specify @var{hist}, then the default history list
+ If you don't specify @var{history}, then the default history list
@code{minibuffer-history} is used. For other standard history lists,
see below. You can also create your own history list variable; just
initialize it to @code{nil} before the first use.
@section Initial Input
Several of the functions for minibuffer input have an argument called
-@var{initial} or @var{initial-contents}. This is a mostly-deprecated
+@var{initial}. This is a mostly-deprecated
feature for specifying that the minibuffer should start out with
certain text, instead of empty as usual.
There is just one situation where you should specify a string for an
@var{initial} argument. This is when you specify a cons cell for the
-@var{hist} or @var{history} argument. @xref{Minibuffer History}.
+@var{history} argument. @xref{Minibuffer History}.
@var{initial} can also be a cons cell of the form @code{(@var{string}
. @var{position})}. This means to insert @var{string} in the
permissible completions are the elements of the alist that are either
strings, or conses whose @sc{car} is a string or symbol.
Symbols are converted to strings using @code{symbol-name}. Other
-elements of the alist are ignored. (Remember that in Emacs Lisp, the
+elements of the alist are ignored. (Remember that in Emacs Lisp, the
elements of alists do not @emph{have} to be conses.) In particular, a
list of strings is allowed, even though we usually do not
think of such lists as alists.
This section describes the basic interface for reading from the
minibuffer with completion.
-@defun completing-read prompt collection &optional predicate require-match initial hist default inherit-input-method
+@defun completing-read prompt collection &optional predicate require-match initial history default inherit-input-method
This function reads a string in the minibuffer, assisting the user by
providing completion. It activates the minibuffer with prompt
@var{prompt}, which must be a string.
@code{minibuffer-local-must-match-map} if @var{require-match} is
non-@code{nil}. @xref{Completion Commands}.
-The argument @var{hist} specifies which history list variable to use for
+The argument @var{history} specifies which history list variable to use for
saving the input and for minibuffer history commands. It defaults to
@code{minibuffer-history}. @xref{Minibuffer History}.
The argument @var{initial} is mostly deprecated; we recommend using a
non-@code{nil} value only in conjunction with specifying a cons cell
-for @var{hist}. @xref{Initial Input}. For default input, use
+for @var{history}. @xref{Initial Input}. For default input, use
@var{default} instead.
If the argument @var{inherit-input-method} is non-@code{nil}, then the
@end example
@end defopt
-@defun read-shell-command prompt &optional initial-contents hist &rest args
+@defun read-shell-command prompt &optional initial history &rest args
This function reads a shell command from the minibuffer, prompting
with @var{prompt} and providing intelligent completion. It completes
the first word of the command using candidates that are appropriate
for command names, and the rest of the command words as file names.
This function uses @code{minibuffer-local-shell-command-map} as the
-keymap for minibuffer input. The @var{hist} argument specifies the
+keymap for minibuffer input. The @var{history} argument specifies the
history list to use; if is omitted or @code{nil}, it defaults to
@code{shell-command-history} (@pxref{Minibuffer History,
-shell-command-history}). The optional argument @var{initial-contents}
+shell-command-history}). The optional argument @var{initial}
specifies the initial content of the minibuffer (@pxref{Initial
Input}). The rest of @var{args}, if present, are used as the
@var{default} and @var{inherit-input-method} arguments in
@item (boundaries . @var{suffix})
This specifies a @code{completion-boundaries} operation. The function
-should return @code{(boundaries START . END)}, where START is the
-position of the beginning boundary in the specified string, and END is
-the position of the end boundary in SUFFIX.
+should return @code{(boundaries @var{start} . @var{end})}, where
+@var{start} is the position of the beginning boundary in the specified
+string, and @var{end} is the position of the end boundary in
+@var{suffix}.
@item metadata
This specifies a request for information about the state of the
This function asks the user a question, expecting input in the echo
area. It returns @code{t} if the user types @kbd{y}, @code{nil} if the
user types @kbd{n}. This function also accepts @key{SPC} to mean yes
-and @key{DEL} to mean no. It accepts @kbd{C-]} to mean ``quit,'' like
+and @key{DEL} to mean no. It accepts @kbd{C-]} to mean ``quit'', like
@kbd{C-g}, because the question might look like a minibuffer and for
that reason the user might try to use @kbd{C-]} to get out. The answer
is a single character, with no @key{RET} needed to terminate it. Upper
appears on the screen at a time.
@end defun
-@defun y-or-n-p-with-timeout prompt seconds default-value
+@defun y-or-n-p-with-timeout prompt seconds default
Like @code{y-or-n-p}, except that if the user fails to answer within
@var{seconds} seconds, this function stops waiting and returns
-@var{default-value}. It works by setting up a timer; see @ref{Timers}.
+@var{default}. It works by setting up a timer; see @ref{Timers}.
The argument @var{seconds} may be an integer or a floating point number.
@end defun
When the user responds with @var{char}, @code{map-y-or-n-p} calls
@var{function}. If it returns non-@code{nil}, the object is considered
-``acted upon,'' and @code{map-y-or-n-p} advances to the next object in
+``acted upon'', and @code{map-y-or-n-p} advances to the next object in
@var{list}. If it returns @code{nil}, the prompt is repeated for the
same object.