Document undocumented completion commands
* src/minibuf.c (Fread_from_minibuffer): * lisp/minibuffer.el (minibuffer-complete-history) (minibuffer-complete-defaults): Doc fixes. * doc/emacs/mini.texi (Completion Commands): Fix markup, style of describing commands, and indexing. Document 'C-x UP' and 'C-x DOWN'.
This commit is contained in:
parent
c29b798537
commit
8064b2a679
3 changed files with 72 additions and 47 deletions
|
@ -343,18 +343,44 @@ when completion is allowed.
|
||||||
@table @kbd
|
@table @kbd
|
||||||
@item @key{TAB}
|
@item @key{TAB}
|
||||||
Complete the text in the minibuffer as much as possible; if unable to
|
Complete the text in the minibuffer as much as possible; if unable to
|
||||||
complete, display a list of possible completions
|
complete, display a list of possible completions.
|
||||||
(@code{minibuffer-complete}).
|
|
||||||
@item @key{SPC}
|
@item @key{SPC}
|
||||||
Complete up to one word from the minibuffer text before point
|
Complete up to one word from the minibuffer text before point.
|
||||||
(@code{minibuffer-complete-word}). This command is not available for
|
@item C-x @key{UP}
|
||||||
arguments that often include spaces, such as file names.
|
Complete the text in the minibuffer using minibuffer history.
|
||||||
|
@item C-x @key{DOWN}
|
||||||
|
Complete the text in the minibuffer using minibuffer defaults.
|
||||||
@item @key{RET}
|
@item @key{RET}
|
||||||
Submit the text in the minibuffer as the argument, possibly completing
|
Submit the text in the minibuffer as the argument, possibly completing
|
||||||
first (@code{minibuffer-complete-and-exit}). @xref{Completion Exit}.
|
first. @xref{Completion Exit}.
|
||||||
@item ?
|
@item ?
|
||||||
Display a list of completions and a few useful key bindings
|
Display a list of completions and a few useful key bindings
|
||||||
(@code{minibuffer-completion-help}).
|
(@code{minibuffer-completion-help}).
|
||||||
|
@item M-@key{DOWN}
|
||||||
|
@itemx M-@key{UP}
|
||||||
|
Navigate through list of completions.
|
||||||
|
@item M-v
|
||||||
|
@itemx M-g M-c
|
||||||
|
@itemx @key{PageUp}
|
||||||
|
@itemx @key{prior}
|
||||||
|
While in the minibuffer, select the window showing the completion list.
|
||||||
|
@item @key{RET}
|
||||||
|
In the completions buffer, choose the completion at point.
|
||||||
|
@item mouse-1
|
||||||
|
@itemx mouse-2
|
||||||
|
In the completions buffer, choose the completion at mouse click.
|
||||||
|
@item @key{TAB}
|
||||||
|
@itemx @key{RIGHT}
|
||||||
|
@itemx @key{n}
|
||||||
|
In the completions buffer, move to the following completion candidate.
|
||||||
|
@item @key{S-TAB}
|
||||||
|
@itemx @key{LEFT}
|
||||||
|
@itemx @key{p}
|
||||||
|
In the completions buffer, move to the previous completion candidate.
|
||||||
|
@item q
|
||||||
|
Quit the completions window and switch to the minibuffer window.
|
||||||
|
@item z
|
||||||
|
Kill the completions buffer and delete the window showing it.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@kindex TAB @r{(completion)}
|
@kindex TAB @r{(completion)}
|
||||||
|
@ -372,7 +398,8 @@ are chosen.
|
||||||
@samp{auto-f} in the minibuffer and type @key{SPC}, it finds that the
|
@samp{auto-f} in the minibuffer and type @key{SPC}, it finds that the
|
||||||
completion is @samp{auto-fill-mode}, but it only inserts @samp{ill-},
|
completion is @samp{auto-fill-mode}, but it only inserts @samp{ill-},
|
||||||
giving @samp{auto-fill-}. Another @key{SPC} at this point completes
|
giving @samp{auto-fill-}. Another @key{SPC} at this point completes
|
||||||
all the way to @samp{auto-fill-mode}.
|
all the way to @samp{auto-fill-mode}. This command is not available for
|
||||||
|
arguments that often include spaces, such as file names.
|
||||||
|
|
||||||
@kindex ? @r{(completion)}
|
@kindex ? @r{(completion)}
|
||||||
@cindex completion list
|
@cindex completion list
|
||||||
|
@ -383,7 +410,6 @@ can display the same completion list and help with @kbd{?}
|
||||||
(@code{minibuffer-completion-help}). The following commands can be used
|
(@code{minibuffer-completion-help}). The following commands can be used
|
||||||
with the completion list:
|
with the completion list:
|
||||||
|
|
||||||
@table @kbd
|
|
||||||
@vindex minibuffer-completion-auto-choose
|
@vindex minibuffer-completion-auto-choose
|
||||||
@kindex M-DOWN
|
@kindex M-DOWN
|
||||||
@kindex M-UP
|
@kindex M-UP
|
||||||
|
@ -391,12 +417,10 @@ with the completion list:
|
||||||
@findex minibuffer-next-completion
|
@findex minibuffer-next-completion
|
||||||
@findex minibuffer-previous-completion
|
@findex minibuffer-previous-completion
|
||||||
@findex minibuffer-choose-completion
|
@findex minibuffer-choose-completion
|
||||||
@item M-@key{DOWN}
|
|
||||||
@itemx M-@key{UP}
|
|
||||||
While in the minibuffer or in the completion list buffer, @kbd{M-@key{DOWN}}
|
While in the minibuffer or in the completion list buffer, @kbd{M-@key{DOWN}}
|
||||||
(@code{minibuffer-next-completion} and @kbd{M-@key{UP}}
|
(@code{minibuffer-next-completion} and @kbd{M-@key{UP}}
|
||||||
(@code{minibuffer-previous-completion}) navigate through the
|
(@code{minibuffer-previous-completion}) navigate through the
|
||||||
completions and displayed in the completions buffer. When
|
completions displayed in the completions buffer. When
|
||||||
@code{minibuffer-completion-auto-choose} is non-@code{nil} (which is
|
@code{minibuffer-completion-auto-choose} is non-@code{nil} (which is
|
||||||
the default), using these commands also inserts the current completion
|
the default), using these commands also inserts the current completion
|
||||||
candidate into the minibuffer. If
|
candidate into the minibuffer. If
|
||||||
|
@ -408,9 +432,6 @@ M-@key{RET}} inserts the currently active candidate without exiting
|
||||||
the minibuffer.
|
the minibuffer.
|
||||||
|
|
||||||
@findex switch-to-completions
|
@findex switch-to-completions
|
||||||
@item M-v
|
|
||||||
@itemx @key{PageUp}
|
|
||||||
@itemx @key{prior}
|
|
||||||
Typing @kbd{M-v}, while in the minibuffer, selects the window showing
|
Typing @kbd{M-v}, while in the minibuffer, selects the window showing
|
||||||
the completion list (@code{switch-to-completions}). This paves the
|
the completion list (@code{switch-to-completions}). This paves the
|
||||||
way for using the commands below. @key{PageUp}, @key{prior} and
|
way for using the commands below. @key{PageUp}, @key{prior} and
|
||||||
|
@ -418,39 +439,38 @@ way for using the commands below. @key{PageUp}, @key{prior} and
|
||||||
ways (@pxref{Windows}).
|
ways (@pxref{Windows}).
|
||||||
|
|
||||||
@findex choose-completion
|
@findex choose-completion
|
||||||
@item @key{RET}
|
While in the completion list buffer, @kbd{@key{RET}} chooses the completion
|
||||||
@itemx mouse-1
|
candidate at point (@code{choose-completion}) and @kbd{mouse-1} and
|
||||||
@itemx mouse-2
|
@kbd{mouse-2} choose the completion at mouse click. With a prefix
|
||||||
While in the completion list buffer, this chooses the completion at
|
argument, @kbd{C-u @key{RET}} inserts the completion at point into the
|
||||||
point (@code{choose-completion}). With a prefix argument, @kbd{C-u
|
minibuffer, but doesn't exit the minibuffer---thus, you can change your
|
||||||
@key{RET}} inserts the completion at point into the minibuffer, but
|
mind and choose another candidate.
|
||||||
doesn't exit the minibuffer---thus, you can change your mind and
|
|
||||||
choose another candidate.
|
|
||||||
|
|
||||||
@findex next-completion
|
@findex next-completion
|
||||||
@item @key{TAB}
|
While in the completion list buffer, you can use @kbd{@key{TAB}},
|
||||||
@item @key{RIGHT}
|
@kbd{@key{RIGHT}}, or @kbd{n} to move point to the following completion
|
||||||
@item @key{n}
|
candidate (@code{next-completion}). You can also use @kbd{@key{S-TAB}},
|
||||||
While in the completion list buffer, these keys move point to the
|
@kbd{@key{LEFT}}, and @kbd{p} to move point to the previous completion
|
||||||
following completion alternative (@code{next-completion}).
|
alternative (@code{previous-completion}).
|
||||||
|
|
||||||
@findex previous-completion
|
@findex minibuffer-complete-history
|
||||||
@item @key{S-TAB}
|
@findex minibuffer-complete-defaults
|
||||||
@item @key{LEFT}
|
@kindex C-x UP @r{(completion)}
|
||||||
@item @key{p}
|
@kindex C-x DOWN @r{(completion)}
|
||||||
While in the completion list buffer, these keys move point to the
|
You can also complete using the history of minibuffer inputs for the
|
||||||
previous completion alternative (@code{previous-completion}).
|
command which prompted you. @kbd{C-x @key{UP}}
|
||||||
|
(@code{minibuffer-complete-history}) works like @kbd{@key{TAB}}, but
|
||||||
|
completes using minibuffer history instead of the usual completion
|
||||||
|
candidates. A similar command @kbd{C-x @key{DOWN}}
|
||||||
|
(@code{minibuffer-complete-defaults}) completes using the default input
|
||||||
|
items provided by the prompting command.
|
||||||
|
|
||||||
@findex quit-window
|
@findex quit-window
|
||||||
@item @kbd{q}
|
|
||||||
While in the completion list buffer, this quits the window showing it
|
|
||||||
and selects the window showing the minibuffer (@code{quit-window}).
|
|
||||||
|
|
||||||
@findex kill-current-buffer
|
@findex kill-current-buffer
|
||||||
@item @kbd{z}
|
Finally, @kbd{q} quits the window showing it and selects the window
|
||||||
While in the completion list buffer, kill it and delete the window
|
showing the minibuffer (@code{quit-window}), and @kbd{z} kills the
|
||||||
showing it (@code{kill-current-buffer}).
|
completion buffer and delete the window showing it
|
||||||
@end table
|
(@code{kill-current-buffer}).
|
||||||
|
|
||||||
@vindex minibuffer-visible-completions
|
@vindex minibuffer-visible-completions
|
||||||
If the variable @code{minibuffer-visible-completions} is customized to
|
If the variable @code{minibuffer-visible-completions} is customized to
|
||||||
|
|
|
@ -4927,9 +4927,9 @@ contents."
|
||||||
(error (minibuffer-complete-and-exit))))
|
(error (minibuffer-complete-and-exit))))
|
||||||
|
|
||||||
(defun minibuffer-complete-history ()
|
(defun minibuffer-complete-history ()
|
||||||
"Complete the minibuffer history as far as possible.
|
"Complete as far as possible using the minibuffer history.
|
||||||
Like `minibuffer-complete' but completes on the history items
|
Like `minibuffer-complete' but completes using the history of minibuffer
|
||||||
instead of the default completion table."
|
inputs for the prompting command, instead of the default completion table."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((history (symbol-value minibuffer-history-variable))
|
(let* ((history (symbol-value minibuffer-history-variable))
|
||||||
(completions
|
(completions
|
||||||
|
@ -4952,9 +4952,9 @@ instead of the default completion table."
|
||||||
(complete-with-action action completions string pred)))))))
|
(complete-with-action action completions string pred)))))))
|
||||||
|
|
||||||
(defun minibuffer-complete-defaults ()
|
(defun minibuffer-complete-defaults ()
|
||||||
"Complete minibuffer defaults as far as possible.
|
"Complete as far as possible using the minibuffer defaults.
|
||||||
Like `minibuffer-complete' but completes on the default items
|
Like `minibuffer-complete' but completes using the default items
|
||||||
instead of the completion table."
|
provided by the prompting command, instead of the completion table."
|
||||||
(interactive)
|
(interactive)
|
||||||
(when (and (not minibuffer-default-add-done)
|
(when (and (not minibuffer-default-add-done)
|
||||||
(functionp minibuffer-default-add-function))
|
(functionp minibuffer-default-add-function))
|
||||||
|
|
|
@ -1293,6 +1293,11 @@ barf_if_interaction_inhibited (void)
|
||||||
DEFUN ("read-from-minibuffer", Fread_from_minibuffer,
|
DEFUN ("read-from-minibuffer", Fread_from_minibuffer,
|
||||||
Sread_from_minibuffer, 1, 7, 0,
|
Sread_from_minibuffer, 1, 7, 0,
|
||||||
doc: /* Read a string from the minibuffer, prompting with string PROMPT.
|
doc: /* Read a string from the minibuffer, prompting with string PROMPT.
|
||||||
|
While in the minibuffer, you can use \\<minibuffer-local-completion-map>\\[minibuffer-complete] and \\[minibuffer-complete-word] to complete your input.
|
||||||
|
You can also use \\<minibuffer-local-map>\\[minibuffer-complete-history] to complete using history items in the
|
||||||
|
input history HIST, and you can use \\[minibuffer-complete-defaults] to complete using
|
||||||
|
the default items in DEFAULT-VALUE.
|
||||||
|
|
||||||
The optional second arg INITIAL-CONTENTS is an obsolete alternative to
|
The optional second arg INITIAL-CONTENTS is an obsolete alternative to
|
||||||
DEFAULT-VALUE. It normally should be nil in new code, except when
|
DEFAULT-VALUE. It normally should be nil in new code, except when
|
||||||
HIST is a cons. It is discussed in more detail below.
|
HIST is a cons. It is discussed in more detail below.
|
||||||
|
|
Loading…
Add table
Reference in a new issue