]> code.delx.au - gnu-emacs/blobdiff - lispref/minibuf.texi
(set-face-stipple): Reference description of bitmap data
[gnu-emacs] / lispref / minibuf.texi
index f0adf00035a6f82a461cefa98fe06fbb8808443a..0bdb634af3fd76606d12d7e5ba98dd5e4b3b502b 100644 (file)
@@ -1,6 +1,7 @@
 @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
@@ -450,7 +451,6 @@ A history list for file-name arguments.
 @end defvar
 
 @defvar buffer-name-history
-@tindex buffer-name-history
 A history list for buffer-name arguments.
 @end defvar
 
@@ -614,16 +614,15 @@ too short).  Both of those begin with the string @samp{foobar}.
 
 @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}:
 
@@ -698,6 +697,12 @@ into the minibuffer as part of the input.  Then it allows the user to
 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}
@@ -1444,7 +1449,6 @@ The return value of @code{map-y-or-n-p} is the number of objects acted on.
   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{.}
@@ -1504,11 +1508,32 @@ This function returns the prompt string of the currently active
 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