[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 567258ab430 1/2: Mention minibuffer-next-completion in completion
From: |
Eli Zaretskii |
Subject: |
master 567258ab430 1/2: Mention minibuffer-next-completion in completion-help |
Date: |
Sat, 8 Jul 2023 09:44:22 -0400 (EDT) |
branch: master
commit 567258ab4309a7406cd4087d28cd0e820b17e157
Author: Spencer Baugh <sbaugh@janestreet.com>
Commit: Eli Zaretskii <eliz@gnu.org>
Mention minibuffer-next-completion in completion-help
Now that it's not necessary to switch to the *Completions* buffer to
switch between and choose completions, we should make that clear in
the help text. Let's also make the bindings uniform both in and
outside the *Completions* buffer so users don't have to think about
the difference.
In working with new users, they've assumed that since the help text in
*Completions* says "Click on a completion to select it", that that's
the only way to select a completion. This text should help clarify
that.
* doc/emacs/mini.texi (Completion Commands): Document new bindings.
* lisp/simple.el (completion-list-mode-map): Bind
minibuffer-{next,previous,choose}-completion.
(completion-setup-function): Mention bindings for
minibuffer-{next,previous,choose}-completion. (Bug#64425)
---
doc/emacs/mini.texi | 4 ++--
lisp/simple.el | 15 ++++++++++-----
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index 87546aadfde..21e2d38e96f 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -391,7 +391,7 @@ used with the completion list:
@findex minibuffer-choose-completion
@item M-@key{DOWN}
@itemx M-@key{UP}
-While in the minibuffer, @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-previous-completion}) navigate through the
completions and displayed in the completions buffer. When
@@ -411,7 +411,7 @@ the minibuffer.
@itemx @key{prior}
Typing @kbd{M-v}, while in the minibuffer, selects the window showing
the completion list (@code{switch-to-completions}). This paves the
-way for using the commands below. @key{PageUp}, @key{prior} and
+way for also using the commands below. @key{PageUp}, @key{prior} and
@kbd{M-g M-c} does the same. You can also select the window in other
ways (@pxref{Windows}).
diff --git a/lisp/simple.el b/lisp/simple.el
index 7da2bf0fae2..e31ef026ad5 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9804,6 +9804,9 @@ makes it easier to edit it."
(define-key map [right] 'next-completion)
(define-key map [?\t] 'next-completion)
(define-key map [backtab] 'previous-completion)
+ (define-key map [M-up] 'minibuffer-previous-completion)
+ (define-key map [M-down] 'minibuffer-next-completion)
+ (define-key map "\M-\r" 'minibuffer-choose-completion)
(define-key map "z" 'kill-current-buffer)
(define-key map "n" 'next-completion)
(define-key map "p" 'previous-completion)
@@ -10198,11 +10201,13 @@ Called from `temp-buffer-show-hook'."
;; Maybe insert help string.
(when completion-show-help
(goto-char (point-min))
- (if (display-mouse-p)
- (insert "Click on a completion to select it.\n"))
- (insert (substitute-command-keys
- "In this buffer, type \\[choose-completion] to \
-select the completion near point.\n\n"))))))
+ (insert (substitute-command-keys
+ (if (display-mouse-p)
+ "Click or type \\[minibuffer-choose-completion] on a
completion to select it.\n"
+ "Type \\[minibuffer-choose-completion] on a completion to
select it.\n")))
+ (insert (substitute-command-keys
+ "Type \\[minibuffer-next-completion] or
\\[minibuffer-previous-completion] \
+to move point between completions.\n\n"))))))
(add-hook 'completion-setup-hook #'completion-setup-function)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 567258ab430 1/2: Mention minibuffer-next-completion in completion-help,
Eli Zaretskii <=