]> git.eshelyaron.com Git - emacs.git/commitdiff
Further improvements to completion-list-mode-map
authorGregory Heytings <gregory@heytings.org>
Tue, 25 May 2021 08:39:48 +0000 (10:39 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 25 May 2021 08:39:48 +0000 (10:39 +0200)
* doc/emacs/mini.texi (Completion Commands): Mention the change,
and mention the 'n' and 'p' keys bound to 'next-completion' and
'previous-completion'. (bug#47699).
* lisp/minibuffer.el (minibuffer-local-completion-map): Change the
M-g key to M-g M-c.

* lisp/simple.el (completion-list-mode-map): Change the M-g key to
M-g M-c.
(read-expression-map): Bind M-g M-c to
read-expression-switch-to-completions.
(read-expression-switch-to-completions): New function.

doc/emacs/mini.texi
etc/NEWS
lisp/minibuffer.el
lisp/simple.el

index 564e57630013a495a3fd55626e2c2232f4401d2e..2fdb1e7072f8e91ac8a8c0b84e235a02c994f5ab 100644 (file)
@@ -375,8 +375,8 @@ used with the completion list:
 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
-@kbd{M-g} does the same.  You can also select the window in other ways
-(@pxref{Windows}).
+@kbd{M-g M-c} does the same.  You can also select the window in other
+ways (@pxref{Windows}).
 
 @findex choose-completion
 @item @key{RET}
@@ -388,12 +388,14 @@ point (@code{choose-completion}).
 @findex next-completion
 @item @key{TAB}
 @item @key{RIGHT}
+@item @key{n}
 While in the completion list buffer, these keys move point to the
 following completion alternative (@code{next-completion}).
 
 @findex previous-completion
 @item @key{S-TAB}
 @item @key{LEFT}
+@item @key{p}
 While in the completion list buffer, these keys move point to the
 previous completion alternative (@code{previous-completion}).
 
index d163c188718cf45774acd684984320734cc04f59..1541b74a3be8639c066f71140a8568a711623dd2 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -444,8 +444,8 @@ major mode.
 
 ** Completion List Mode
 New key bindings have been added: 'n' and 'p' to navigate completions,
-and 'M-g' to switch to the minibuffer, and you can also switch back
-to the completion list buffer with 'M-g'.
+and 'M-g M-c' to switch to the minibuffer, and you can also switch back
+to the completion list buffer with 'M-g M-c'.
 
 ** Benchmark
 *** New function 'benchmark-call' to measure the execution time of a function.
index 36fb8e72c15291e183a8ae00a60f55ac15360519..ec21b7b93b69beeaef289b21c93238c9ab3540ac 100644 (file)
@@ -2603,7 +2603,7 @@ The completion method is determined by `completion-at-point-functions'."
     (define-key map "?" 'minibuffer-completion-help)
     (define-key map [prior] 'switch-to-completions)
     (define-key map "\M-v"  'switch-to-completions)
-    (define-key map "\M-g"  'switch-to-completions)
+    (define-key map "\M-g\M-c"  'switch-to-completions)
     map)
   "Local keymap for minibuffer input with completion.")
 
index b3470ac7b091e59a383f364630816f72397ddbb0..884991936025b2b64d69367d4b25089fa2ed66fc 100644 (file)
@@ -1661,6 +1661,7 @@ in *Help* buffer.  See also the command `describe-char'."
     (define-key m "\t" 'completion-at-point)
     (define-key m "\r" 'read--expression-try-read)
     (define-key m "\n" 'read--expression-try-read)
+    (define-key m "\M-g\M-c" 'read-expression-switch-to-completions)
     (set-keymap-parent m minibuffer-local-map)
     m))
 
@@ -8848,7 +8849,7 @@ makes it easier to edit it."
     (define-key map "z" 'kill-current-buffer)
     (define-key map "n" 'next-completion)
     (define-key map "p" 'previous-completion)
-    (define-key map "\M-g" 'switch-to-minibuffer)
+    (define-key map "\M-g\M-c" 'switch-to-minibuffer)
     map)
   "Local map for completion list buffers.")
 
@@ -9138,6 +9139,12 @@ select the completion near point.\n\n"))))))
       (when (bobp)
        (next-completion 1)))))
 
+(defun read-expression-switch-to-completions ()
+  "Select the completion list window while reading an expression."
+  (interactive)
+  (completion-help-at-point)
+  (switch-to-completions))
+
 (defun switch-to-minibuffer ()
   "Select the minibuffer window."
   (interactive)