emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/doc/lispref/minibuf.texi,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/doc/lispref/minibuf.texi,v
Date: Sat, 18 Oct 2008 13:13:54 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    08/10/18 13:13:54

Index: minibuf.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/lispref/minibuf.texi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- minibuf.texi        2 May 2008 01:03:21 -0000       1.8
+++ minibuf.texi        18 Oct 2008 13:13:54 -0000      1.9
@@ -101,9 +101,11 @@
 
   Most often, the minibuffer is used to read text as a string.  It can
 also be used to read a Lisp object in textual form.  The most basic
-primitive for minibuffer input is @code{read-from-minibuffer}; it can do
-either one.  There are also specialized commands for reading
-commands, variables, file names, etc. (@pxref{Completion}).
+primitive for minibuffer input is @code{read-from-minibuffer}; it can
+do either one.  Regular expressions (@pxref{Regular Expressions}) are
+a special kind of strings; use @code{read-regexp} for their minibuffer
+input.  There are also specialized commands for reading commands,
+variables, file names, etc.@: (@pxref{Completion}).
 
   In most cases, you should not call minibuffer input functions in the
 middle of a Lisp function.  Instead, do all minibuffer input as part of
@@ -201,6 +203,40 @@
 @end smallexample
 @end defun
 
address@hidden 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
address@hidden  The keymap used is
address@hidden, and @code{regexp-history} is used as the
+history list (@pxref{Minibuffer History, regexp-history}).
+
+The optional argument @var{default}, if address@hidden, 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
address@hidden is a string, that string is the default value.  When it
+is a list of strings, the first string is the default value.  To this
+default @code{read-regexp} adds a few other useful candidates, and
+passes them to @code{read-from-minibuffer} to make them available to
+the user as the ``future minibuffer history list'' (@pxref{Minibuffer
+History, future list,, emacs, The GNU Emacs Manual}).  These
+candidates are:
+
address@hidden @minus
address@hidden
+The Word or symbol at point.
address@hidden
+The last regexp used in an incremental search.
address@hidden
+The last string used in an incremental search.
address@hidden
+The last string or pattern used in query-replace commands.
address@hidden itemize
+
+This function works by calling the @code{read-from-minibuffer}
+function, after computing the list of defaults as described above.
address@hidden 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.
@@ -839,9 +875,12 @@
 If @var{require-match} is @code{nil}, the exit commands work regardless
 of the input in the minibuffer.  If @var{require-match} is @code{t}, the
 usual minibuffer exit commands won't exit unless the input completes to
-an element of @var{collection}.  If @var{require-match} is neither
address@hidden nor @code{t}, then the exit commands won't exit unless the
-input already in the buffer matches an element of @var{collection}.
+an element of @var{collection}.  If @var{require-match} is
address@hidden, the user can exit with any input, but she will
+asked for a confirmation if the input is not an element of
address@hidden  Any other value of @var{require-match} behaves like
address@hidden, except that the exit commands won't exit if it does non-null
+completion.
 
 However, empty input is always permitted, regardless of the value of
 @var{require-match}; in that case, @code{completing-read} returns the
@@ -1058,7 +1097,7 @@
 function @code{read-file-name}.
 @end defvar
 
address@hidden minibuffer-local-must-match-filename-map
address@hidden minibuffer-local-filename-must-match-map
 This is like @code{minibuffer-local-must-match-map}
 except that it does not bind @key{SPC}.  This keymap is used by the
 function @code{read-file-name}.
@@ -1257,7 +1296,7 @@
 @code{read-file-name} uses
 @code{minibuffer-local-filename-completion-map} as the keymap if
 @var{existing} is @code{nil}, and uses
address@hidden if @var{existing} is
address@hidden if @var{existing} is
 address@hidden  @xref{Completion Commands}.
 
 The argument @var{directory} specifies the directory to use for




reply via email to

[Prev in Thread] Current Thread [Next in Thread]