]> git.eshelyaron.com Git - emacs.git/commitdiff
; Bind 'minibuffer-complete-and-exit' in "Minibuf" menu
authorEshel Yaron <me@eshelyaron.com>
Wed, 3 Jan 2024 15:04:59 +0000 (16:04 +0100)
committerEshel Yaron <me@eshelyaron.com>
Fri, 19 Jan 2024 10:07:05 +0000 (11:07 +0100)
* lisp/menu-bar.el (minibuffer-local-completion-map): Bind
'minibuffer-complete-and-exit' in "Minibuf" menu bar menu, shadowing
the binding of 'exit-minibuffer' in that menu.

lisp/menu-bar.el

index d8e4497833aa1a372dfbcf4bf4a1857653ad917d..b7c6b31cf7b1c98445866b1cee67c276f7655eab 100644 (file)
@@ -2556,6 +2556,10 @@ It must accept a buffer as its only required argument.")
     (cons "Minibuf" (make-sparse-keymap "Minibuf"))))
 
 (let ((map minibuffer-local-completion-map))
+  (bindings--define-key map [menu-bar minibuf return]
+    '(menu-item "Enter" minibuffer-complete-and-exit
+                :key-sequence "\r"
+               :help "Complete input and exit minibuffer"))
   (bindings--define-key map
       [menu-bar minibuf minibuffer-widen-completions]
     '(menu-item "Remove Completions Restrictions"