@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998 Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001
+@c Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/minibuf
@node Minibuffers, Command Loop, Read and Print, Top
@end defvar
@defvar buffer-name-history
-@tindex buffer-name-history
A history list for buffer-name arguments.
@end defvar
@defun all-completions string collection &optional predicate nospace
This function returns a list of all possible completions of
-@var{string}. The arguments to this function are the same as those of
-@code{try-completion}.
+@var{string}. The arguments to this function (aside from @var{nospace})
+are the same as those of @code{try-completion}. If @var{nospace} is
+non-@code{nil}, completions that start with a space are ignored unless
+@var{string} also starts with a space.
If @var{collection} is a function, it is called with three arguments:
@var{string}, @var{predicate} and @code{t}; then @code{all-completions}
returns whatever the function returns. @xref{Programmed Completion}.
-If @var{nospace} is non-@code{nil}, completions that start with a space
-are ignored unless @var{string} also starts with a space.
-
Here is an example, using the function @code{test} shown in the
example for @code{try-completion}:
edit the input, providing several commands to attempt completion.
In most cases, we recommend using @var{default}, and not @var{initial}.
+@strong{We discourage use of a non-@code{nil} value for
+@var{initial}}, because it is an intrusive interface. The history
+list feature (which did not exist when we introduced @var{initial})
+offers a far more convenient and general way for the user to get the
+default and edit it, and it is always available.
+
If the argument @var{inherit-input-method} is non-@code{nil}, then the
minibuffer inherits the current input method (@pxref{Input
Methods}) and the setting of @code{enable-multibyte-characters}
To read a password to pass to another program, you can use the
function @code{read-passwd}.
-@tindex read-passwd
@defun read-passwd prompt &optional confirm default
This function reads a password, prompting with @var{prompt}. It does
not echo the password as the user types it; instead, it echoes @samp{.}
minibuffer. If no minibuffer is active, it returns @code{nil}.
@end defun
-@tindex minibuffer-prompt-end
@defun minibuffer-prompt-end
+@tindex minibuffer-prompt-end
This function, available starting in Emacs 21, returns the current
position of the end of the minibuffer prompt, if a minibuffer is
-current. Otherwise, it returns zero.
+current. Otherwise, it returns the minimum valid buffer position.
+@end defun
+
+@defun minibuffer-contents
+@tindex minibuffer-contents
+This function, available starting in Emacs 21, returns the editable
+contents of the minibuffer (that is, everything except the prompt) as
+a string, if a minibuffer is current. Otherwise, it returns the
+entire contents of the current buffer.
+@end defun
+
+@defun minibuffer-contents-no-properties
+@tindex minibuffer-contents-no-properties
+This is like @code{minibuffer-contents}, except that it does not copy text
+properties, just the characters themselves. @xref{Text Properties}.
+@end defun
+
+@defun delete-minibuffer-contents
+@tindex delete-minibuffer-contents
+This function, available starting in Emacs 21, erases the editable
+contents of the minibuffer (that is, everything except the prompt), if
+a minibuffer is current. Otherwise, it erases the entire buffer.
@end defun
@defun minubuffer-prompt-width