diff options
| -rw-r--r-- | doc/lispref/minibuf.texi | 53 |
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 | |||
| 56 | marked as a field (@pxref{Fields}), so that certain motion functions, | 56 | marked as a field (@pxref{Fields}), so that certain motion functions, |
| 57 | including @code{beginning-of-line}, @code{forward-word}, | 57 | including @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 |
| 59 | boundary between the prompt and the actual text. (In older Emacs | 59 | boundary between the prompt and the actual text. |
| 60 | versions, the prompt was displayed using a special mechanism and was not | ||
| 61 | part 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 |
| 64 | automatically if necessary if the contents require more space. You can | 62 | automatically if the contents require more space. You can explicitly |
| 65 | explicitly resize it temporarily with the window sizing commands; it | 63 | resize it temporarily with the window sizing commands; it reverts to |
| 66 | reverts to its normal size when the minibuffer is exited. You can | 64 | its normal size when the minibuffer is exited. You can resize it |
| 67 | resize it permanently by using the window sizing commands in the frame's | 65 | permanently by using the window sizing commands in the frame's other |
| 68 | other window, when the minibuffer is not active. If the frame contains | 66 | window, when the minibuffer is not active. If the frame contains just |
| 69 | just a minibuffer, you can change the minibuffer's size by changing the | 67 | a minibuffer, you can change the minibuffer's size by changing the |
| 70 | frame's size. | 68 | frame'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 |
| 75 | code that uses the minibuffer, if you do not want that to change them. | 73 | code 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 |
| 78 | this is called a @dfn{recursive minibuffer}. The first minibuffer is | 76 | there is an active minibuffer; such minibuffers are called a |
| 79 | named @w{@samp{ *Minibuf-0*}}. Recursive minibuffers are named by | 77 | @dfn{recursive minibuffer}. The first minibuffer is named |
| 80 | incrementing the number at the end of the name. (The names begin with a | 78 | @w{ @samp{*Minibuf-0*}}. Recursive minibuffers are named by |
| 81 | space so that they won't show up in normal buffer lists.) Of several | 79 | incrementing the number at the end of the name. (The names begin with |
| 82 | recursive minibuffers, the innermost (or most recently entered) is the | 80 | a space so that they won't show up in normal buffer lists.) Of |
| 83 | active minibuffer. We usually call this ``the'' minibuffer. You can | 81 | several recursive minibuffers, the innermost (or most recently |
| 84 | permit or forbid recursive minibuffers by setting the variable | 82 | entered) is the active minibuffer. We usually call this ``the'' |
| 85 | @code{enable-recursive-minibuffers} or by putting properties of that | 83 | minibuffer. You can permit or forbid recursive minibuffers by setting |
| 86 | name on command symbols (@pxref{Recursive Mini}). | 84 | the variable @code{enable-recursive-minibuffers}, or by putting |
| 85 | properties 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 |
| 103 | also 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 |
| 104 | primitive for minibuffer input is @code{read-from-minibuffer}; it can | 103 | or a Lisp object in textual form. The function @code{read-regexp} is |
| 105 | do either one. Regular expressions (@pxref{Regular Expressions}) are | 104 | used for reading regular expressions (@pxref{Regular Expressions}), |
| 106 | a special kind of strings; use @code{read-regexp} for their minibuffer | 105 | which are a special kind of string. There are also specialized |
| 107 | input. There are also specialized commands for reading commands, | 106 | functions for reading commands, variables, file names, etc.@: |
| 108 | variables, 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 |
| 111 | middle of a Lisp function. Instead, do all minibuffer input as part of | 110 | middle 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} | |||
| 113 | specification. @xref{Defining Commands}. | 112 | specification. @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 |
| 116 | This function is the most general way to get input through the | 115 | This function is the most general way to get input from the |
| 117 | minibuffer. By default, it accepts arbitrary text and returns it as a | 116 | minibuffer. By default, it accepts arbitrary text and returns it as a |
| 118 | string; however, if @var{read} is non-@code{nil}, then it uses | 117 | string; 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 |