diff options
| author | Chong Yidong | 2012-02-15 21:45:02 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-02-15 21:45:02 +0800 |
| commit | 60236b0dca0416202da5c3e39564b85b2ae3c9fa (patch) | |
| tree | 64a7ddc4416b0010b37b3edec55495331275ce9d | |
| parent | 888ab66104667346aff8a1569b924fe92daac7e2 (diff) | |
| download | emacs-60236b0dca0416202da5c3e39564b85b2ae3c9fa.tar.gz emacs-60236b0dca0416202da5c3e39564b85b2ae3c9fa.zip | |
Docstring and manual updates for completion-at-point-functions.
* doc/lispref/minibuf.texi (Basic Completion): Define "completion table".
Move completion-in-region to Completion in Buffers node.
(Completion Commands): Use "completion table" terminology.
(Completion in Buffers): New node.
* doc/lispref/modes.texi (Hooks): add-hook can be used for abnormal hooks too.
(Setting Hooks): Update minor mode usage example.
(Major Mode Conventions): Note that completion-at-point-functions
should be altered locally. Add xref to Completion in Buffers.
* lisp/minibuffer.el (completion-at-point-functions): Doc fix.
| -rw-r--r-- | doc/lispref/ChangeLog | 12 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 147 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 53 | ||||
| -rw-r--r-- | doc/lispref/vol1.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/vol2.texi | 1 | ||||
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 8 |
8 files changed, 155 insertions, 70 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 296b4e90b4b..1e369f3b627 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2012-02-15 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * minibuf.texi (Basic Completion): Define "completion table". | ||
| 4 | Move completion-in-region to Completion in Buffers node. | ||
| 5 | (Completion Commands): Use "completion table" terminology. | ||
| 6 | (Completion in Buffers): New node. | ||
| 7 | |||
| 8 | * modes.texi (Hooks): add-hook can be used for abnormal hooks too. | ||
| 9 | (Setting Hooks): Update minor mode usage example. | ||
| 10 | (Major Mode Conventions): Note that completion-at-point-functions | ||
| 11 | should be altered locally. Add xref to Completion in Buffers. | ||
| 12 | |||
| 1 | 2012-02-15 Glenn Morris <rgm@gnu.org> | 13 | 2012-02-15 Glenn Morris <rgm@gnu.org> |
| 2 | 14 | ||
| 3 | * processes.texi (Network): Document open-network-stream :parameters. | 15 | * processes.texi (Network): Document open-network-stream :parameters. |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 42c3613dd0b..5dd8994f439 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -654,6 +654,7 @@ Completion | |||
| 654 | shell commands. | 654 | shell commands. |
| 655 | * Completion Styles:: Specifying rules for performing completion. | 655 | * Completion Styles:: Specifying rules for performing completion. |
| 656 | * Programmed Completion:: Writing your own completion-function. | 656 | * Programmed Completion:: Writing your own completion-function. |
| 657 | * Completion in Buffers:: Completing text in ordinary buffers. | ||
| 657 | 658 | ||
| 658 | Command Loop | 659 | Command Loop |
| 659 | 660 | ||
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index a71138f5268..1224d80fdf8 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -633,6 +633,7 @@ for reading certain kinds of names with completion. | |||
| 633 | shell commands. | 633 | shell commands. |
| 634 | * Completion Styles:: Specifying rules for performing completion. | 634 | * Completion Styles:: Specifying rules for performing completion. |
| 635 | * Programmed Completion:: Writing your own completion-function. | 635 | * Programmed Completion:: Writing your own completion-function. |
| 636 | * Completion in Buffers:: Completing text in ordinary buffers. | ||
| 636 | @end menu | 637 | @end menu |
| 637 | 638 | ||
| 638 | @node Basic Completion | 639 | @node Basic Completion |
| @@ -644,10 +645,12 @@ higher-level completion features that do use the minibuffer. | |||
| 644 | 645 | ||
| 645 | @defun try-completion string collection &optional predicate | 646 | @defun try-completion string collection &optional predicate |
| 646 | This function returns the longest common substring of all possible | 647 | This function returns the longest common substring of all possible |
| 647 | completions of @var{string} in @var{collection}. The value of | 648 | completions of @var{string} in @var{collection}. |
| 648 | @var{collection} must be a list of strings, an alist whose keys are | 649 | |
| 649 | strings or symbols, an obarray, a hash table, or a completion function | 650 | @cindex completion table |
| 650 | (@pxref{Programmed Completion}). | 651 | The @var{collection} argument is called the @dfn{completion table}. |
| 652 | Its value must be a list of strings, an alist whose keys are strings | ||
| 653 | or symbols, an obarray, a hash table, or a completion function. | ||
| 651 | 654 | ||
| 652 | Completion compares @var{string} against each of the permissible | 655 | Completion compares @var{string} against each of the permissible |
| 653 | completions specified by @var{collection}. If no permissible | 656 | completions specified by @var{collection}. If no permissible |
| @@ -678,13 +681,13 @@ Also, you cannot intern a given symbol in more than one obarray. | |||
| 678 | If @var{collection} is a hash table, then the keys that are strings | 681 | If @var{collection} is a hash table, then the keys that are strings |
| 679 | are the possible completions. Other keys are ignored. | 682 | are the possible completions. Other keys are ignored. |
| 680 | 683 | ||
| 681 | You can also use a function as @var{collection}. | 684 | You can also use a function as @var{collection}. Then the function is |
| 682 | Then the function is solely responsible for performing completion; | 685 | solely responsible for performing completion; @code{try-completion} |
| 683 | @code{try-completion} returns whatever this function returns. The | 686 | returns whatever this function returns. The function is called with |
| 684 | function is called with three arguments: @var{string}, @var{predicate} | 687 | three arguments: @var{string}, @var{predicate} and @code{nil} (the |
| 685 | and @code{nil} (the reason for the third argument is so that the same | 688 | reason for the third argument is so that the same function can be used |
| 686 | function can be used in @code{all-completions} and do the appropriate | 689 | in @code{all-completions} and do the appropriate thing in either |
| 687 | thing in either case). @xref{Programmed Completion}. | 690 | case). @xref{Programmed Completion}. |
| 688 | 691 | ||
| 689 | If the argument @var{predicate} is non-@code{nil}, then it must be a | 692 | If the argument @var{predicate} is non-@code{nil}, then it must be a |
| 690 | function of one argument, unless @var{collection} is a hash table, in | 693 | function of one argument, unless @var{collection} is a hash table, in |
| @@ -862,30 +865,13 @@ proper value is done the first time you do completion using @var{var}. | |||
| 862 | It is done by calling @var{fun} with no arguments. The | 865 | It is done by calling @var{fun} with no arguments. The |
| 863 | value @var{fun} returns becomes the permanent value of @var{var}. | 866 | value @var{fun} returns becomes the permanent value of @var{var}. |
| 864 | 867 | ||
| 865 | Here is an example of use: | 868 | Here is a usage example: |
| 866 | 869 | ||
| 867 | @smallexample | 870 | @smallexample |
| 868 | (defvar foo (lazy-completion-table foo make-my-alist)) | 871 | (defvar foo (lazy-completion-table foo make-my-alist)) |
| 869 | @end smallexample | 872 | @end smallexample |
| 870 | @end defmac | 873 | @end defmac |
| 871 | 874 | ||
| 872 | The function @code{completion-in-region} provides a convenient way to | ||
| 873 | perform completion on an arbitrary stretch of text in an Emacs buffer: | ||
| 874 | |||
| 875 | @defun completion-in-region start end collection &optional predicate | ||
| 876 | This function completes the text in the current buffer between the | ||
| 877 | positions @var{start} and @var{end}, using @var{collection}. The | ||
| 878 | argument @var{collection} has the same meaning as in | ||
| 879 | @code{try-completion} (@pxref{Basic Completion}). | ||
| 880 | |||
| 881 | This function inserts the completion text directly into the current | ||
| 882 | buffer. Unlike @code{completing-read} (@pxref{Minibuffer | ||
| 883 | Completion}), it does not activate the minibuffer. | ||
| 884 | |||
| 885 | For this function to work, point must be somewhere between @var{start} | ||
| 886 | and @var{end}. | ||
| 887 | @end defun | ||
| 888 | |||
| 889 | @node Minibuffer Completion | 875 | @node Minibuffer Completion |
| 890 | @subsection Completion and the Minibuffer | 876 | @subsection Completion and the Minibuffer |
| 891 | @cindex minibuffer completion | 877 | @cindex minibuffer completion |
| @@ -899,13 +885,14 @@ This function reads a string in the minibuffer, assisting the user by | |||
| 899 | providing completion. It activates the minibuffer with prompt | 885 | providing completion. It activates the minibuffer with prompt |
| 900 | @var{prompt}, which must be a string. | 886 | @var{prompt}, which must be a string. |
| 901 | 887 | ||
| 902 | The actual completion is done by passing @var{collection} and | 888 | The actual completion is done by passing the completion table |
| 903 | @var{predicate} to the function @code{try-completion} (@pxref{Basic | 889 | @var{collection} and the completion predicate @var{predicate} to the |
| 904 | Completion}). This happens in certain commands bound in the local | 890 | function @code{try-completion} (@pxref{Basic Completion}). This |
| 905 | keymaps used for completion. Some of these commands also call | 891 | happens in certain commands bound in the local keymaps used for |
| 906 | @code{test-completion}. Thus, if @var{predicate} is non-@code{nil}, | 892 | completion. Some of these commands also call @code{test-completion}. |
| 907 | it should be compatible with @var{collection} and | 893 | Thus, if @var{predicate} is non-@code{nil}, it should be compatible |
| 908 | @code{completion-ignore-case}. @xref{Definition of test-completion}. | 894 | with @var{collection} and @code{completion-ignore-case}. |
| 895 | @xref{Definition of test-completion}. | ||
| 909 | 896 | ||
| 910 | The value of the optional argument @var{require-match} determines how | 897 | The value of the optional argument @var{require-match} determines how |
| 911 | the user may exit the minibuffer: | 898 | the user may exit the minibuffer: |
| @@ -1005,10 +992,11 @@ They are described in the following section. | |||
| 1005 | in the minibuffer to do completion. | 992 | in the minibuffer to do completion. |
| 1006 | 993 | ||
| 1007 | @defvar minibuffer-completion-table | 994 | @defvar minibuffer-completion-table |
| 1008 | The value of this variable is the collection used for completion in | 995 | The value of this variable is the completion table used for completion |
| 1009 | the minibuffer. This is the global variable that contains what | 996 | in the minibuffer. This is the global variable that contains what |
| 1010 | @code{completing-read} passes to @code{try-completion}. It is used by | 997 | @code{completing-read} passes to @code{try-completion}. It is used by |
| 1011 | minibuffer completion commands such as @code{minibuffer-complete-word}. | 998 | minibuffer completion commands such as |
| 999 | @code{minibuffer-complete-word}. | ||
| 1012 | @end defvar | 1000 | @end defvar |
| 1013 | 1001 | ||
| 1014 | @defvar minibuffer-completion-predicate | 1002 | @defvar minibuffer-completion-predicate |
| @@ -1717,6 +1705,87 @@ completion via the variable @code{minibuffer-completion-table} | |||
| 1717 | (@pxref{Completion Commands}). | 1705 | (@pxref{Completion Commands}). |
| 1718 | @end defvar | 1706 | @end defvar |
| 1719 | 1707 | ||
| 1708 | @node Completion in Buffers | ||
| 1709 | @subsection Completion in Ordinary Buffers | ||
| 1710 | @cindex inline completion | ||
| 1711 | |||
| 1712 | @findex completion-at-point | ||
| 1713 | Although completion is usually done in the minibuffer, the | ||
| 1714 | completion facility can also be used on the text in ordinary Emacs | ||
| 1715 | buffers. In many major modes, in-buffer completion is performed by | ||
| 1716 | the @kbd{C-M-i} or @kbd{M-@key{TAB}} command, bound to | ||
| 1717 | @code{completion-at-point}. @xref{Symbol Completion,,, emacs, The GNU | ||
| 1718 | Emacs Manual}. This command uses the abnormal hook variable | ||
| 1719 | @code{completion-at-point-functions}: | ||
| 1720 | |||
| 1721 | @defvar completion-at-point-functions | ||
| 1722 | The value of this abnormal hook should be a list of functions, which | ||
| 1723 | are used to compute a completion table for completing the text at | ||
| 1724 | point. It can be used by major modes to provide mode-specific | ||
| 1725 | completion tables (@pxref{Major Mode Conventions}). | ||
| 1726 | |||
| 1727 | When the command @code{completion-at-point} runs, it calls the | ||
| 1728 | functions in the list one by one, without any argument. Each function | ||
| 1729 | should return @code{nil} if it is unable to produce a completion table | ||
| 1730 | for the text at point. Otherwise it should return a list of the form | ||
| 1731 | |||
| 1732 | @example | ||
| 1733 | (@var{start} @var{end} @var{collection} . @var{props}) | ||
| 1734 | @end example | ||
| 1735 | |||
| 1736 | @noindent | ||
| 1737 | @var{start} and @var{end} delimit the text to complete (which should | ||
| 1738 | enclose point). @var{collection} is a completion table for completing | ||
| 1739 | that text, in a form suitable for passing as the second argument to | ||
| 1740 | @code{try-completion} (@pxref{Basic Completion}); completion | ||
| 1741 | alternatives will be generated from this completion table in the usual | ||
| 1742 | way, via the completion styles defined in @code{completion-styles} | ||
| 1743 | (@pxref{Completion Styles}). @var{props} is a property list for | ||
| 1744 | additional information; the following optional properties are | ||
| 1745 | recognized: | ||
| 1746 | |||
| 1747 | @table @code | ||
| 1748 | @item :predicate | ||
| 1749 | The value should be a predicate that completion candidates need to | ||
| 1750 | satisfy. | ||
| 1751 | |||
| 1752 | @item :exclusive | ||
| 1753 | If the value is @code{no}, then if the completion table fails to match | ||
| 1754 | the text at point, then @code{completion-at-point} moves on to the | ||
| 1755 | next function in @code{completion-at-point-functions} instead of | ||
| 1756 | reporting a completion failure. | ||
| 1757 | @end table | ||
| 1758 | |||
| 1759 | A function in @code{completion-at-point-functions} may also return a | ||
| 1760 | function. In that case, that returned function is called, with no | ||
| 1761 | argument, and it is entirely responsible for performing the | ||
| 1762 | completion. We discourage this usage; it is intended to help convert | ||
| 1763 | old code to using @code{completion-at-point}. | ||
| 1764 | |||
| 1765 | The first function in @code{completion-at-point-functions} to return a | ||
| 1766 | non-@code{nil} value is used by @code{completion-at-point}. The | ||
| 1767 | remaining functions are not called. The exception to this is when | ||
| 1768 | there is a @code{:exclusive} specification, as described above. | ||
| 1769 | @end defvar | ||
| 1770 | |||
| 1771 | The following function provides a convenient way to perform | ||
| 1772 | completion on an arbitrary stretch of text in an Emacs buffer: | ||
| 1773 | |||
| 1774 | @defun completion-in-region start end collection &optional predicate | ||
| 1775 | This function completes the text in the current buffer between the | ||
| 1776 | positions @var{start} and @var{end}, using @var{collection}. The | ||
| 1777 | argument @var{collection} has the same meaning as in | ||
| 1778 | @code{try-completion} (@pxref{Basic Completion}). | ||
| 1779 | |||
| 1780 | This function inserts the completion text directly into the current | ||
| 1781 | buffer. Unlike @code{completing-read} (@pxref{Minibuffer | ||
| 1782 | Completion}), it does not activate the minibuffer. | ||
| 1783 | |||
| 1784 | For this function to work, point must be somewhere between @var{start} | ||
| 1785 | and @var{end}. | ||
| 1786 | @end defun | ||
| 1787 | |||
| 1788 | |||
| 1720 | @node Yes-or-No Queries | 1789 | @node Yes-or-No Queries |
| 1721 | @section Yes-or-No Queries | 1790 | @section Yes-or-No Queries |
| 1722 | @cindex asking the user questions | 1791 | @cindex asking the user questions |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 0b020bee0b0..94ae767586b 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -48,17 +48,16 @@ you it is normal. We try to make all hooks normal, as much as | |||
| 48 | possible, so that you can use them in a uniform way. | 48 | possible, so that you can use them in a uniform way. |
| 49 | 49 | ||
| 50 | Every major mode command is supposed to run a normal hook called the | 50 | Every major mode command is supposed to run a normal hook called the |
| 51 | @dfn{mode hook} as the one of the last steps of initialization. This | 51 | @dfn{mode hook} as one of the last steps of initialization. This makes |
| 52 | makes it easy for a user to customize the behavior of the mode, by | 52 | it easy for a user to customize the behavior of the mode, by overriding |
| 53 | overriding the buffer-local variable assignments already made by the | 53 | the buffer-local variable assignments already made by the mode. Most |
| 54 | mode. Most minor mode functions also run a mode hook at the end. But | 54 | minor mode functions also run a mode hook at the end. But hooks are |
| 55 | hooks are used in other contexts too. For example, the hook | 55 | used in other contexts too. For example, the hook @code{suspend-hook} |
| 56 | @code{suspend-hook} runs just before Emacs suspends itself | 56 | runs just before Emacs suspends itself (@pxref{Suspending Emacs}). |
| 57 | (@pxref{Suspending Emacs}). | 57 | |
| 58 | 58 | The recommended way to add a hook function to a hook is by calling | |
| 59 | The recommended way to add a hook function to a normal hook is by | 59 | @code{add-hook} (@pxref{Setting Hooks}). The hook functions may be any |
| 60 | calling @code{add-hook} (see below). The hook functions may be any of | 60 | of the valid kinds of functions that @code{funcall} accepts (@pxref{What |
| 61 | the valid kinds of functions that @code{funcall} accepts (@pxref{What | ||
| 62 | Is a Function}). Most normal hook variables are initially void; | 61 | Is a Function}). Most normal hook variables are initially void; |
| 63 | @code{add-hook} knows how to deal with this. You can add hooks either | 62 | @code{add-hook} knows how to deal with this. You can add hooks either |
| 64 | globally or buffer-locally with @code{add-hook}. | 63 | globally or buffer-locally with @code{add-hook}. |
| @@ -178,7 +177,7 @@ calls @code{wrap-function} with arguments @code{fun} and @code{args}. | |||
| 178 | in Lisp Interaction mode: | 177 | in Lisp Interaction mode: |
| 179 | 178 | ||
| 180 | @example | 179 | @example |
| 181 | (add-hook 'lisp-interaction-mode-hook 'turn-on-auto-fill) | 180 | (add-hook 'lisp-interaction-mode-hook 'auto-fill-mode) |
| 182 | @end example | 181 | @end example |
| 183 | 182 | ||
| 184 | @defun add-hook hook function &optional append local | 183 | @defun add-hook hook function &optional append local |
| @@ -202,13 +201,13 @@ If @var{function} has a non-@code{nil} property | |||
| 202 | changing major modes) won't delete it from the hook variable's local | 201 | changing major modes) won't delete it from the hook variable's local |
| 203 | value. | 202 | value. |
| 204 | 203 | ||
| 205 | It is best to design your hook functions so that the order in which | 204 | For a normal hook, hook functions should be designed so that the order |
| 206 | they are executed does not matter. Any dependence on the order is | 205 | in which they are executed does not matter. Any dependence on the order |
| 207 | asking for trouble. However, the order is predictable: normally, | 206 | is asking for trouble. However, the order is predictable: normally, |
| 208 | @var{function} goes at the front of the hook list, so it will be | 207 | @var{function} goes at the front of the hook list, so it is executed |
| 209 | executed first (barring another @code{add-hook} call). If the | 208 | first (barring another @code{add-hook} call). If the optional argument |
| 210 | optional argument @var{append} is non-@code{nil}, the new hook | 209 | @var{append} is non-@code{nil}, the new hook function goes at the end of |
| 211 | function goes at the end of the hook list and will be executed last. | 210 | the hook list and is executed last. |
| 212 | 211 | ||
| 213 | @code{add-hook} can handle the cases where @var{hook} is void or its | 212 | @code{add-hook} can handle the cases where @var{hook} is void or its |
| 214 | value is a single function; it sets or changes the value to a list of | 213 | value is a single function; it sets or changes the value to a list of |
| @@ -302,8 +301,8 @@ initialization, function and variable names, and hooks. | |||
| 302 | 301 | ||
| 303 | If you use the @code{define-derived-mode} macro, it will take care of | 302 | If you use the @code{define-derived-mode} macro, it will take care of |
| 304 | many of these conventions automatically. @xref{Derived Modes}. Note | 303 | many of these conventions automatically. @xref{Derived Modes}. Note |
| 305 | also that fundamental mode is an exception to many of these conventions, | 304 | also that Fundamental mode is an exception to many of these conventions, |
| 306 | because its definition is to present the global state of Emacs. | 305 | because it represents the default state of Emacs. |
| 307 | 306 | ||
| 308 | The following list of conventions is only partial. Each major mode | 307 | The following list of conventions is only partial. Each major mode |
| 309 | should aim for consistency in general with other Emacs major modes, as | 308 | should aim for consistency in general with other Emacs major modes, as |
| @@ -460,8 +459,9 @@ The mode can specify a local value for | |||
| 460 | this mode. | 459 | this mode. |
| 461 | 460 | ||
| 462 | @item | 461 | @item |
| 463 | The mode can specify how to complete various keywords by adding | 462 | The mode can specify how to complete various keywords by adding one or |
| 464 | to the special hook @code{completion-at-point-functions}. | 463 | more buffer-local entries to the special hook |
| 464 | @code{completion-at-point-functions}. @xref{Completion in Buffers}. | ||
| 465 | 465 | ||
| 466 | @item | 466 | @item |
| 467 | Use @code{defvar} or @code{defcustom} to set mode-related variables, so | 467 | Use @code{defvar} or @code{defcustom} to set mode-related variables, so |
| @@ -555,16 +555,15 @@ In the comments that document the file, you should provide a sample | |||
| 555 | @cindex mode loading | 555 | @cindex mode loading |
| 556 | The top-level forms in the file defining the mode should be written so | 556 | The top-level forms in the file defining the mode should be written so |
| 557 | that they may be evaluated more than once without adverse consequences. | 557 | that they may be evaluated more than once without adverse consequences. |
| 558 | Even if you never load the file more than once, someone else will. | ||
| 559 | @end itemize | 558 | @end itemize |
| 560 | 559 | ||
| 561 | @node Auto Major Mode | 560 | @node Auto Major Mode |
| 562 | @subsection How Emacs Chooses a Major Mode | 561 | @subsection How Emacs Chooses a Major Mode |
| 563 | @cindex major mode, automatic selection | 562 | @cindex major mode, automatic selection |
| 564 | 563 | ||
| 565 | Based on information in the file name or in the file itself, Emacs | 564 | When Emacs visits a file, it automatically selects a major mode for |
| 566 | automatically selects a major mode for the new buffer when a file is | 565 | the buffer based on information in the file name or in the file itself. |
| 567 | visited. It also processes local variables specified in the file text. | 566 | It also processes local variables specified in the file text. |
| 568 | 567 | ||
| 569 | @deffn Command normal-mode &optional find-file | 568 | @deffn Command normal-mode &optional find-file |
| 570 | This function establishes the proper major mode and buffer-local variable | 569 | This function establishes the proper major mode and buffer-local variable |
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index cc96726745f..dbab287b273 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi | |||
| @@ -675,6 +675,7 @@ Completion | |||
| 675 | shell commands. | 675 | shell commands. |
| 676 | * Completion Styles:: Specifying rules for performing completion. | 676 | * Completion Styles:: Specifying rules for performing completion. |
| 677 | * Programmed Completion:: Writing your own completion-function. | 677 | * Programmed Completion:: Writing your own completion-function. |
| 678 | * Completion in Buffers:: Completing text in ordinary buffers. | ||
| 678 | 679 | ||
| 679 | Command Loop | 680 | Command Loop |
| 680 | 681 | ||
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 33246cb567d..38e2f1dc5e9 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi | |||
| @@ -674,6 +674,7 @@ Completion | |||
| 674 | shell commands. | 674 | shell commands. |
| 675 | * Completion Styles:: Specifying rules for performing completion. | 675 | * Completion Styles:: Specifying rules for performing completion. |
| 676 | * Programmed Completion:: Writing your own completion-function. | 676 | * Programmed Completion:: Writing your own completion-function. |
| 677 | * Completion in Buffers:: Completing text in ordinary buffers. | ||
| 677 | 678 | ||
| 678 | Command Loop | 679 | Command Loop |
| 679 | 680 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ccb1394e3d5..bdbe99d5452 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -5,6 +5,8 @@ | |||
| 5 | 5 | ||
| 6 | 2012-02-15 Chong Yidong <cyd@gnu.org> | 6 | 2012-02-15 Chong Yidong <cyd@gnu.org> |
| 7 | 7 | ||
| 8 | * minibuffer.el (completion-at-point-functions): Doc fix. | ||
| 9 | |||
| 8 | * custom.el (defcustom): Doc fix; note use of defvar. | 10 | * custom.el (defcustom): Doc fix; note use of defvar. |
| 9 | 11 | ||
| 10 | 2012-02-15 Glenn Morris <rgm@gnu.org> | 12 | 2012-02-15 Glenn Morris <rgm@gnu.org> |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 611df1eb6d9..8564cc2009b 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1550,16 +1550,16 @@ the mode if ARG is omitted or nil." | |||
| 1550 | Each function on this hook is called in turns without any argument and should | 1550 | Each function on this hook is called in turns without any argument and should |
| 1551 | return either nil to mean that it is not applicable at point, | 1551 | return either nil to mean that it is not applicable at point, |
| 1552 | or a function of no argument to perform completion (discouraged), | 1552 | or a function of no argument to perform completion (discouraged), |
| 1553 | or a list of the form (START END COLLECTION &rest PROPS) where | 1553 | or a list of the form (START END COLLECTION . PROPS) where |
| 1554 | START and END delimit the entity to complete and should include point, | 1554 | START and END delimit the entity to complete and should include point, |
| 1555 | COLLECTION is the completion table to use to complete it, and | 1555 | COLLECTION is the completion table to use to complete it, and |
| 1556 | PROPS is a property list for additional information. | 1556 | PROPS is a property list for additional information. |
| 1557 | Currently supported properties are all the properties that can appear in | 1557 | Currently supported properties are all the properties that can appear in |
| 1558 | `completion-extra-properties' plus: | 1558 | `completion-extra-properties' plus: |
| 1559 | `:predicate' a predicate that completion candidates need to satisfy. | 1559 | `:predicate' a predicate that completion candidates need to satisfy. |
| 1560 | `:exclusive' If `no', means that if the completion data does not match the | 1560 | `:exclusive' If `no', means that if the completion table fails to |
| 1561 | text at point failure, then instead of reporting a completion failure, | 1561 | match the text at point, then instead of reporting a completion |
| 1562 | the completion should try the next completion function.") | 1562 | failure, the completion should try the next completion function.") |
| 1563 | 1563 | ||
| 1564 | (defvar completion--capf-misbehave-funs nil | 1564 | (defvar completion--capf-misbehave-funs nil |
| 1565 | "List of functions found on `completion-at-point-functions' that misbehave. | 1565 | "List of functions found on `completion-at-point-functions' that misbehave. |