Commit d918e2dc authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(minibuffer maps): Use dolist rather than mapcar.

parent 754005f7
......@@ -1151,48 +1151,37 @@ key (or menu-item)"))
;;; Set up a menu bar menu for the minibuffer.
(mapcar
(function
(lambda (map)
(define-key map [menu-bar minibuf]
(cons "Minibuf" (make-sparse-keymap "Minibuf")))))
(list minibuffer-local-ns-map
minibuffer-local-must-match-map
minibuffer-local-isearch-map
minibuffer-local-map
minibuffer-local-completion-map))
(mapcar
(function
(lambda (map)
(define-key map [menu-bar minibuf ?\?]
(list 'menu-item "List Completions" 'minibuffer-completion-help
:help "Display all possible completions"))
(define-key map [menu-bar minibuf space]
(list 'menu-item "Complete Word" 'minibuffer-complete-word
:help "Complete at most one word"))
(define-key map [menu-bar minibuf tab]
(list 'menu-item "Complete" 'minibuffer-complete
:help "Complete as far as possible"))
))
(list minibuffer-local-must-match-map
minibuffer-local-completion-map))
(mapcar
(function
(lambda (map)
(define-key map [menu-bar minibuf quit]
(list 'menu-item "Quit" 'keyboard-escape-quit
:help "Abort input and exit minibuffer"))
(define-key map [menu-bar minibuf return]
(list 'menu-item "Enter" 'exit-minibuffer
:help "Terminate input and exit minibuffer"))
))
(list minibuffer-local-ns-map
minibuffer-local-must-match-map
minibuffer-local-isearch-map
minibuffer-local-map
minibuffer-local-completion-map))
(dolist (map (list minibuffer-local-ns-map
minibuffer-local-must-match-map
minibuffer-local-isearch-map
minibuffer-local-map
minibuffer-local-completion-map))
(define-key map [menu-bar minibuf]
(cons "Minibuf" (make-sparse-keymap "Minibuf"))))
(dolist (map (list minibuffer-local-must-match-map
minibuffer-local-completion-map))
(define-key map [menu-bar minibuf ?\?]
(list 'menu-item "List Completions" 'minibuffer-completion-help
:help "Display all possible completions"))
(define-key map [menu-bar minibuf space]
(list 'menu-item "Complete Word" 'minibuffer-complete-word
:help "Complete at most one word"))
(define-key map [menu-bar minibuf tab]
(list 'menu-item "Complete" 'minibuffer-complete
:help "Complete as far as possible")))
(dolist (map (list minibuffer-local-ns-map
minibuffer-local-must-match-map
minibuffer-local-isearch-map
minibuffer-local-map
minibuffer-local-completion-map))
(define-key map [menu-bar minibuf quit]
(list 'menu-item "Quit" 'keyboard-escape-quit
:help "Abort input and exit minibuffer"))
(define-key map [menu-bar minibuf return]
(list 'menu-item "Enter" 'exit-minibuffer
:help "Terminate input and exit minibuffer")))
(defcustom menu-bar-mode nil
"Toggle display of a menu bar on each frame.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment