aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/minibuf.texi39
1 files changed, 25 insertions, 14 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 766079d7bcd..a2b6e145502 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -1108,11 +1108,11 @@ different function to completely override the normal behavior of
1108in the minibuffer to do completion. 1108in the minibuffer to do completion.
1109 1109
1110@defvar minibuffer-completion-table 1110@defvar minibuffer-completion-table
1111The value of this variable is the completion table used for completion 1111The value of this variable is the completion table (@pxref{Basic
1112in the minibuffer. This is the global variable that contains what 1112Completion}) used for completion in the minibuffer. This is the
1113@code{completing-read} passes to @code{try-completion}. It is used by 1113global variable that contains what @code{completing-read} passes to
1114minibuffer completion commands such as 1114@code{try-completion}. It is used by minibuffer completion commands
1115@code{minibuffer-complete-word}. 1115such as @code{minibuffer-complete-word}.
1116@end defvar 1116@end defvar
1117 1117
1118@defvar minibuffer-completion-predicate 1118@defvar minibuffer-completion-predicate
@@ -1770,7 +1770,8 @@ possible match, and ignore the match if the predicate returns
1770@code{nil}. 1770@code{nil}.
1771 1771
1772@item 1772@item
1773A flag specifying the type of completion operation to perform. This 1773A flag specifying the type of completion operation to perform; see
1774@ref{Basic Completion}, for the details of those operations. This
1774flag may be one of the following values. 1775flag may be one of the following values.
1775 1776
1776@table @code 1777@table @code
@@ -1841,17 +1842,26 @@ the same as for @code{display-sort-function}.
1841 1842
1842@defun completion-table-dynamic function &optional switch-buffer 1843@defun completion-table-dynamic function &optional switch-buffer
1843This function is a convenient way to write a function that can act as 1844This function is a convenient way to write a function that can act as
1844a programmed completion function. The argument @var{function} should be 1845a programmed completion function. The argument @var{function} should
1845a function that takes one argument, a string, and returns an alist of 1846be a function that takes one argument, a string, and returns a
1846possible completions of it. It is allowed to ignore the argument and 1847completion table (@pxref{Basic Completion}) containing all the
1847return a full list of all possible completions. You can think of 1848possible completions. The table returned by @var{function} can also
1848@code{completion-table-dynamic} as a transducer between that interface 1849include elements that don't match the string argument; they are
1850automatically filtered out by @code{completion-table-dynamic}. In
1851particular, @var{function} can ignore its argument and return a full
1852list of all possible completions. You can think of
1853@code{completion-table-dynamic} as a transducer between @var{function}
1849and the interface for programmed completion functions. 1854and the interface for programmed completion functions.
1850 1855
1851If the optional argument @var{switch-buffer} is non-@code{nil}, and 1856If the optional argument @var{switch-buffer} is non-@code{nil}, and
1852completion is performed in the minibuffer, @var{function} will be 1857completion is performed in the minibuffer, @var{function} will be
1853called with current buffer set to the buffer from which the minibuffer 1858called with current buffer set to the buffer from which the minibuffer
1854was entered. 1859was entered.
1860
1861The return value of @code{completion-table-dynamic} is a function that
1862can be used as the 2nd argument to @code{try-completion} and
1863@code{all-completions}. Note that this function will always return
1864empty metadata and trivial boundaries (@pxref{Programmed Completion}).
1855@end defun 1865@end defun
1856 1866
1857@defun completion-table-with-cache function &optional ignore-case 1867@defun completion-table-with-cache function &optional ignore-case
@@ -1876,9 +1886,10 @@ Emacs Manual}. This command uses the abnormal hook variable
1876 1886
1877@defvar completion-at-point-functions 1887@defvar completion-at-point-functions
1878The value of this abnormal hook should be a list of functions, which 1888The value of this abnormal hook should be a list of functions, which
1879are used to compute a completion table for completing the text at 1889are used to compute a completion table (@pxref{Basic Completion}) for
1880point. It can be used by major modes to provide mode-specific 1890completing the text at point. It can be used by major modes to
1881completion tables (@pxref{Major Mode Conventions}). 1891provide mode-specific completion tables (@pxref{Major Mode
1892Conventions}).
1882 1893
1883When the command @code{completion-at-point} runs, it calls the 1894When the command @code{completion-at-point} runs, it calls the
1884functions in the list one by one, without any argument. Each function 1895functions in the list one by one, without any argument. Each function