diff options
| author | Richard M. Stallman | 2005-06-18 13:53:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-06-18 13:53:26 +0000 |
| commit | 9a2625351f07c169ca526e4d1646efbcbb5cd223 (patch) | |
| tree | 64ed21bccc065229c5f1f99365c36228aa7d8ce1 | |
| parent | b02bc8d0491ed3a3308ad0399921e89801c19f21 (diff) | |
| download | emacs-9a2625351f07c169ca526e4d1646efbcbb5cd223.tar.gz emacs-9a2625351f07c169ca526e4d1646efbcbb5cd223.zip | |
Fix formatting ugliness.
(Completion Commands): Move keymap vars to the end
and vars completing-read binds to the top.
| -rw-r--r-- | lispref/minibuf.texi | 141 |
1 files changed, 69 insertions, 72 deletions
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index cdba210b625..a6153fdaca2 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi | |||
| @@ -414,10 +414,9 @@ symbol, not a list; it is a variable whose value is a list of strings | |||
| 414 | inputs. It's the Lisp programmer's job to specify the right history | 414 | inputs. It's the Lisp programmer's job to specify the right history |
| 415 | list for each use of the minibuffer. | 415 | list for each use of the minibuffer. |
| 416 | 416 | ||
| 417 | The basic minibuffer input functions @code{read-from-minibuffer} and | 417 | You specify the history list with the optional @var{hist} argument |
| 418 | @code{completing-read} both accept an optional argument named @var{hist} | 418 | to either @code{read-from-minibuffer} or @code{completing-read}. Here |
| 419 | which is how you specify the history list. Here are the possible | 419 | are the possible values for it: |
| 420 | values: | ||
| 421 | 420 | ||
| 422 | @table @asis | 421 | @table @asis |
| 423 | @item @var{variable} | 422 | @item @var{variable} |
| @@ -587,10 +586,11 @@ for reading certain kinds of names with completion. | |||
| 587 | @node Basic Completion | 586 | @node Basic Completion |
| 588 | @subsection Basic Completion Functions | 587 | @subsection Basic Completion Functions |
| 589 | 588 | ||
| 590 | The functions @code{try-completion}, @code{all-completions} and | 589 | The completion functions @code{try-completion}, |
| 591 | @code{test-completion} have nothing in themselves to do with | 590 | @code{all-completions} and @code{test-completion} have nothing in |
| 592 | minibuffers. We describe them in this chapter so as to keep them near | 591 | themselves to do with minibuffers. We describe them in this chapter |
| 593 | the higher-level completion features that do use the minibuffer. | 592 | so as to keep them near the higher-level completion features that do |
| 593 | use the minibuffer. | ||
| 594 | 594 | ||
| 595 | @defun try-completion string collection &optional predicate | 595 | @defun try-completion string collection &optional predicate |
| 596 | This function returns the longest common substring of all possible | 596 | This function returns the longest common substring of all possible |
| @@ -788,12 +788,12 @@ value @var{fun} returns becomes the permanent value of @var{var}. | |||
| 788 | 788 | ||
| 789 | Here are two examples of use: | 789 | Here are two examples of use: |
| 790 | 790 | ||
| 791 | @example | 791 | @smallexample |
| 792 | (defvar foo (lazy-completion-table foo make-my-alist 'global)) | 792 | (defvar foo (lazy-completion-table foo make-my-alist 'global)) |
| 793 | 793 | ||
| 794 | (make-local-variable 'bar) | 794 | (make-local-variable 'bar) |
| 795 | (setq bar (lazy-completion-table foo make-my-alist 'local) | 795 | (setq bar (lazy-completion-table foo make-my-alist 'local) |
| 796 | @end example | 796 | @end smallexample |
| 797 | @end defmac | 797 | @end defmac |
| 798 | 798 | ||
| 799 | @node Minibuffer Completion | 799 | @node Minibuffer Completion |
| @@ -879,12 +879,9 @@ Complete a foo: fo@point{} | |||
| 879 | If the user then types @kbd{@key{DEL} @key{DEL} b @key{RET}}, | 879 | If the user then types @kbd{@key{DEL} @key{DEL} b @key{RET}}, |
| 880 | @code{completing-read} returns @code{barfoo}. | 880 | @code{completing-read} returns @code{barfoo}. |
| 881 | 881 | ||
| 882 | The @code{completing-read} function binds three variables to pass | 882 | The @code{completing-read} function binds variables to pass |
| 883 | information to the commands that actually do completion. These | 883 | information to the commands that actually do completion. |
| 884 | variables are @code{minibuffer-completion-table}, | 884 | They are described in the following section. |
| 885 | @code{minibuffer-completion-predicate} and | ||
| 886 | @code{minibuffer-completion-confirm}. For more information about them, | ||
| 887 | see @ref{Completion Commands}. | ||
| 888 | @end defun | 885 | @end defun |
| 889 | 886 | ||
| 890 | @node Completion Commands | 887 | @node Completion Commands |
| @@ -898,55 +895,6 @@ some of the commands described below. @xref{Completion Options,,, | |||
| 898 | emacs, The GNU Emacs Manual}, for a short description of Partial | 895 | emacs, The GNU Emacs Manual}, for a short description of Partial |
| 899 | Completion mode. | 896 | Completion mode. |
| 900 | 897 | ||
| 901 | @defvar minibuffer-local-completion-map | ||
| 902 | @code{completing-read} uses this value as the local keymap when an | ||
| 903 | exact match of one of the completions is not required. By default, this | ||
| 904 | keymap makes the following bindings: | ||
| 905 | |||
| 906 | @table @asis | ||
| 907 | @item @kbd{?} | ||
| 908 | @code{minibuffer-completion-help} | ||
| 909 | |||
| 910 | @item @key{SPC} | ||
| 911 | @code{minibuffer-complete-word} | ||
| 912 | |||
| 913 | @item @key{TAB} | ||
| 914 | @code{minibuffer-complete} | ||
| 915 | @end table | ||
| 916 | |||
| 917 | @noindent | ||
| 918 | with other characters bound as in @code{minibuffer-local-map} | ||
| 919 | (@pxref{Definition of minibuffer-local-map}). | ||
| 920 | @end defvar | ||
| 921 | |||
| 922 | @defvar minibuffer-local-must-match-map | ||
| 923 | @code{completing-read} uses this value as the local keymap when an | ||
| 924 | exact match of one of the completions is required. Therefore, no keys | ||
| 925 | are bound to @code{exit-minibuffer}, the command that exits the | ||
| 926 | minibuffer unconditionally. By default, this keymap makes the following | ||
| 927 | bindings: | ||
| 928 | |||
| 929 | @table @asis | ||
| 930 | @item @kbd{?} | ||
| 931 | @code{minibuffer-completion-help} | ||
| 932 | |||
| 933 | @item @key{SPC} | ||
| 934 | @code{minibuffer-complete-word} | ||
| 935 | |||
| 936 | @item @key{TAB} | ||
| 937 | @code{minibuffer-complete} | ||
| 938 | |||
| 939 | @item @kbd{C-j} | ||
| 940 | @code{minibuffer-complete-and-exit} | ||
| 941 | |||
| 942 | @item @key{RET} | ||
| 943 | @code{minibuffer-complete-and-exit} | ||
| 944 | @end table | ||
| 945 | |||
| 946 | @noindent | ||
| 947 | with other characters bound as in @code{minibuffer-local-map}. | ||
| 948 | @end defvar | ||
| 949 | |||
| 950 | @defvar minibuffer-completion-table | 898 | @defvar minibuffer-completion-table |
| 951 | The value of this variable is the collection used for completion in | 899 | The value of this variable is the collection used for completion in |
| 952 | the minibuffer. This is the global variable that contains what | 900 | the minibuffer. This is the global variable that contains what |
| @@ -960,6 +908,13 @@ passes to @code{try-completion}. The variable is also used by the other | |||
| 960 | minibuffer completion functions. | 908 | minibuffer completion functions. |
| 961 | @end defvar | 909 | @end defvar |
| 962 | 910 | ||
| 911 | @defvar minibuffer-completion-confirm | ||
| 912 | When the value of this variable is non-@code{nil}, Emacs asks for | ||
| 913 | confirmation of a completion before exiting the minibuffer. | ||
| 914 | @code{completing-read} binds this variable, and the function | ||
| 915 | @code{minibuffer-complete-and-exit} checks the value before exiting. | ||
| 916 | @end defvar | ||
| 917 | |||
| 963 | @deffn Command minibuffer-complete-word | 918 | @deffn Command minibuffer-complete-word |
| 964 | This function completes the minibuffer contents by at most a single | 919 | This function completes the minibuffer contents by at most a single |
| 965 | word. Even if the minibuffer contents have only one completion, | 920 | word. Even if the minibuffer contents have only one completion, |
| @@ -980,13 +935,6 @@ immediately---the command is programmed to work without confirmation | |||
| 980 | when run twice in succession. | 935 | when run twice in succession. |
| 981 | @end deffn | 936 | @end deffn |
| 982 | 937 | ||
| 983 | @defvar minibuffer-completion-confirm | ||
| 984 | When the value of this variable is non-@code{nil}, Emacs asks for | ||
| 985 | confirmation of a completion before exiting the minibuffer. The | ||
| 986 | function @code{minibuffer-complete-and-exit} checks the value of this | ||
| 987 | variable before it exits. | ||
| 988 | @end defvar | ||
| 989 | |||
| 990 | @deffn Command minibuffer-completion-help | 938 | @deffn Command minibuffer-completion-help |
| 991 | This function creates a list of the possible completions of the | 939 | This function creates a list of the possible completions of the |
| 992 | current minibuffer contents. It works by calling @code{all-completions} | 940 | current minibuffer contents. It works by calling @code{all-completions} |
| @@ -1025,6 +973,55 @@ automatically display a list of possible completions whenever nothing | |||
| 1025 | can be completed because the next character is not uniquely determined. | 973 | can be completed because the next character is not uniquely determined. |
| 1026 | @end defopt | 974 | @end defopt |
| 1027 | 975 | ||
| 976 | @defvar minibuffer-local-completion-map | ||
| 977 | @code{completing-read} uses this value as the local keymap when an | ||
| 978 | exact match of one of the completions is not required. By default, this | ||
| 979 | keymap makes the following bindings: | ||
| 980 | |||
| 981 | @table @asis | ||
| 982 | @item @kbd{?} | ||
| 983 | @code{minibuffer-completion-help} | ||
| 984 | |||
| 985 | @item @key{SPC} | ||
| 986 | @code{minibuffer-complete-word} | ||
| 987 | |||
| 988 | @item @key{TAB} | ||
| 989 | @code{minibuffer-complete} | ||
| 990 | @end table | ||
| 991 | |||
| 992 | @noindent | ||
| 993 | with other characters bound as in @code{minibuffer-local-map} | ||
| 994 | (@pxref{Definition of minibuffer-local-map}). | ||
| 995 | @end defvar | ||
| 996 | |||
| 997 | @defvar minibuffer-local-must-match-map | ||
| 998 | @code{completing-read} uses this value as the local keymap when an | ||
| 999 | exact match of one of the completions is required. Therefore, no keys | ||
| 1000 | are bound to @code{exit-minibuffer}, the command that exits the | ||
| 1001 | minibuffer unconditionally. By default, this keymap makes the following | ||
| 1002 | bindings: | ||
| 1003 | |||
| 1004 | @table @asis | ||
| 1005 | @item @kbd{?} | ||
| 1006 | @code{minibuffer-completion-help} | ||
| 1007 | |||
| 1008 | @item @key{SPC} | ||
| 1009 | @code{minibuffer-complete-word} | ||
| 1010 | |||
| 1011 | @item @key{TAB} | ||
| 1012 | @code{minibuffer-complete} | ||
| 1013 | |||
| 1014 | @item @kbd{C-j} | ||
| 1015 | @code{minibuffer-complete-and-exit} | ||
| 1016 | |||
| 1017 | @item @key{RET} | ||
| 1018 | @code{minibuffer-complete-and-exit} | ||
| 1019 | @end table | ||
| 1020 | |||
| 1021 | @noindent | ||
| 1022 | with other characters bound as in @code{minibuffer-local-map}. | ||
| 1023 | @end defvar | ||
| 1024 | |||
| 1028 | @node High-Level Completion | 1025 | @node High-Level Completion |
| 1029 | @subsection High-Level Completion Functions | 1026 | @subsection High-Level Completion Functions |
| 1030 | 1027 | ||