diff options
| author | Stefan Monnier | 2019-02-18 13:00:44 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2019-02-18 13:00:44 -0500 |
| commit | d49cdd92fc071a27ddd5314aa00e433a73a126d8 (patch) | |
| tree | 25b0d45297324ad3eda7552064e42d598c68ac72 | |
| parent | 5dc4e51e516ba563c4ca5ddffdb29fcfbb2ac221 (diff) | |
| download | emacs-d49cdd92fc071a27ddd5314aa00e433a73a126d8.tar.gz emacs-d49cdd92fc071a27ddd5314aa00e433a73a126d8.zip | |
* lisp/minibuffer.el (completion-table-dynamic): Improve docstring
| -rw-r--r-- | lisp/minibuffer.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 14e62030573..67c691ca212 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -174,10 +174,14 @@ ACTION can be one of nil, t or `lambda'." | |||
| 174 | 174 | ||
| 175 | (defun completion-table-dynamic (fun &optional switch-buffer) | 175 | (defun completion-table-dynamic (fun &optional switch-buffer) |
| 176 | "Use function FUN as a dynamic completion table. | 176 | "Use function FUN as a dynamic completion table. |
| 177 | FUN is called with one argument, the string for which completion is required, | 177 | FUN is called with one argument, the string for which completion is requested, |
| 178 | and it should return an alist containing all the intended possible completions. | 178 | and it should return a completion table containing all the intended possible |
| 179 | This alist may be a full list of possible completions so that FUN can ignore | 179 | completions. |
| 180 | the value of its argument. | 180 | This table is allowed to include elements that do not actually match the |
| 181 | string: they will be automatically filtered out. | ||
| 182 | The completion table returned by FUN can use any of the usual formats of | ||
| 183 | completion tables such as lists, alists, and hash-tables. | ||
| 184 | |||
| 181 | If SWITCH-BUFFER is non-nil and completion is performed in the | 185 | If SWITCH-BUFFER is non-nil and completion is performed in the |
| 182 | minibuffer, FUN will be called in the buffer from which the minibuffer | 186 | minibuffer, FUN will be called in the buffer from which the minibuffer |
| 183 | was entered. | 187 | was entered. |
| @@ -185,6 +189,8 @@ was entered. | |||
| 185 | The result of the `completion-table-dynamic' form is a function | 189 | The result of the `completion-table-dynamic' form is a function |
| 186 | that can be used as the COLLECTION argument to `try-completion' and | 190 | that can be used as the COLLECTION argument to `try-completion' and |
| 187 | `all-completions'. See Info node `(elisp)Programmed Completion'. | 191 | `all-completions'. See Info node `(elisp)Programmed Completion'. |
| 192 | The completion table returned by `completion-table-dynamic' has empty | ||
| 193 | metadata and trivial boundaries. | ||
| 188 | 194 | ||
| 189 | See also the related function `completion-table-with-cache'." | 195 | See also the related function `completion-table-with-cache'." |
| 190 | (lambda (string pred action) | 196 | (lambda (string pred action) |