diff options
| author | Eli Zaretskii | 2016-01-12 21:00:19 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-01-12 21:00:19 +0200 |
| commit | e879070d8c329e4e7ccbd6687ef577589faedcf1 (patch) | |
| tree | eda0bd46fb1871b89aa6ad4d5a0b11389654fdd1 | |
| parent | 792d469d698966e99435d60b4c2136302a171ded (diff) | |
| download | emacs-e879070d8c329e4e7ccbd6687ef577589faedcf1.tar.gz emacs-e879070d8c329e4e7ccbd6687ef577589faedcf1.zip | |
Document changes in 'read-buffer' and 'read-buffer-function'
* doc/lispref/minibuf.texi (High-Level Completion): Document the
4th argument to 'read-buffer' and 'read-buffer-function'.
| -rw-r--r-- | doc/lispref/minibuf.texi | 22 | ||||
| -rw-r--r-- | etc/NEWS | 4 |
2 files changed, 17 insertions, 9 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index bf9564627d6..ead4fe982dc 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -1236,14 +1236,14 @@ Lisp function. When possible, do all minibuffer input as part of | |||
| 1236 | reading the arguments for a command, in the @code{interactive} | 1236 | reading the arguments for a command, in the @code{interactive} |
| 1237 | specification. @xref{Defining Commands}. | 1237 | specification. @xref{Defining Commands}. |
| 1238 | 1238 | ||
| 1239 | @defun read-buffer prompt &optional default require-match | 1239 | @defun read-buffer prompt &optional default require-match predicate |
| 1240 | This function reads the name of a buffer and returns it as a string. | 1240 | This function reads the name of a buffer and returns it as a string. |
| 1241 | The argument @var{default} is the default name to use, the value to | 1241 | It prompts with @var{prompt}. The argument @var{default} is the |
| 1242 | return if the user exits with an empty minibuffer. If non-@code{nil}, | 1242 | default name to use, the value to return if the user exits with an |
| 1243 | it should be a string, a list of strings, or a buffer. If it is | 1243 | empty minibuffer. If non-@code{nil}, it should be a string, a list of |
| 1244 | a list, the default value is the first element of this list. It is | 1244 | strings, or a buffer. If it is a list, the default value is the first |
| 1245 | mentioned in the prompt, but is not inserted in the minibuffer as | 1245 | element of this list. It is mentioned in the prompt, but is not |
| 1246 | initial input. | 1246 | inserted in the minibuffer as initial input. |
| 1247 | 1247 | ||
| 1248 | The argument @var{prompt} should be a string ending with a colon and a | 1248 | The argument @var{prompt} should be a string ending with a colon and a |
| 1249 | space. If @var{default} is non-@code{nil}, the function inserts it in | 1249 | space. If @var{default} is non-@code{nil}, the function inserts it in |
| @@ -1253,6 +1253,12 @@ the minibuffer with a default value (@pxref{Programming Tips}). | |||
| 1253 | The optional argument @var{require-match} has the same meaning as in | 1253 | The optional argument @var{require-match} has the same meaning as in |
| 1254 | @code{completing-read}. @xref{Minibuffer Completion}. | 1254 | @code{completing-read}. @xref{Minibuffer Completion}. |
| 1255 | 1255 | ||
| 1256 | The optional argument @var{predicate}, if non-@code{nil}, specifies a | ||
| 1257 | function to filter the buffers that should be considered: the function | ||
| 1258 | will be called with every potential candidate as its argument, and | ||
| 1259 | should return @code{nil} to reject the candidate, non-@code{nil} to | ||
| 1260 | accept it. | ||
| 1261 | |||
| 1256 | In the following example, the user enters @samp{minibuffer.t}, and | 1262 | In the following example, the user enters @samp{minibuffer.t}, and |
| 1257 | then types @key{RET}. The argument @var{require-match} is @code{t}, | 1263 | then types @key{RET}. The argument @var{require-match} is @code{t}, |
| 1258 | and the only buffer name starting with the given input is | 1264 | and the only buffer name starting with the given input is |
| @@ -1287,7 +1293,7 @@ its usual work, with the same arguments passed to @code{read-buffer}. | |||
| 1287 | 1293 | ||
| 1288 | @defopt read-buffer-completion-ignore-case | 1294 | @defopt read-buffer-completion-ignore-case |
| 1289 | If this variable is non-@code{nil}, @code{read-buffer} ignores case | 1295 | If this variable is non-@code{nil}, @code{read-buffer} ignores case |
| 1290 | when performing completion. | 1296 | when performing completion while reading the buffer name. |
| 1291 | @end defopt | 1297 | @end defopt |
| 1292 | 1298 | ||
| 1293 | @defun read-command prompt &optional default | 1299 | @defun read-command prompt &optional default |
| @@ -1221,7 +1221,9 @@ Use the INSIDE_EMACS environment variable instead. | |||
| 1221 | ** `save-excursion' does not save&restore the mark any more. | 1221 | ** `save-excursion' does not save&restore the mark any more. |
| 1222 | Use `save-mark-and-excursion' if you want the old behavior. | 1222 | Use `save-mark-and-excursion' if you want the old behavior. |
| 1223 | 1223 | ||
| 1224 | ** read-buffer-function can now be called with a 4th argument (`predicate'). | 1224 | +++ |
| 1225 | ** `read-buffer' and `read-buffer-function' can now be called with a 4th | ||
| 1226 | argument (`predicate'). | ||
| 1225 | 1227 | ||
| 1226 | ** completion-table-dynamic stays in the minibuffer. | 1228 | ** completion-table-dynamic stays in the minibuffer. |
| 1227 | If you want the old behavior of calling the function in the buffer | 1229 | If you want the old behavior of calling the function in the buffer |