From: Juri Linkov Date: Sun, 8 Dec 2019 22:19:43 +0000 (+0200) Subject: Move recenter/scroll keybindings from minibuffer-local-map to read-char map X-Git-Tag: emacs-27.0.90~404 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9ea3137bc8601cac9465e953e4e79ee15963e24a;p=emacs.git Move recenter/scroll keybindings from minibuffer-local-map to read-char map * lisp/minibuffer.el (minibuffer-local-map): Move remap of recenter/scroll keybindings to read-char-from-minibuffer-map. * lisp/subr.el (read-char-from-minibuffer-map): Move remap of recenter/scroll keybindings here from minibuffer-local-map. (bug#38502) --- diff --git a/etc/NEWS b/etc/NEWS index 8ac8ea2e409..ff5ac5103f7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -765,9 +765,6 @@ list the contents of such directories when completing file names. ** Minibuffer -*** Scrolling and recentering commands in the minibuffer are invoked -on the original window (that was selected before activating the minibuffer). - +++ *** A new user option, 'minibuffer-beginning-of-buffer-movement', has been introduced to allow controlling how the 'M-<' command works in diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index c2183a67ae5..8af8aca30ec 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2244,12 +2244,6 @@ The completion method is determined by `completion-at-point-functions'." (define-key map "\C-g" 'abort-recursive-edit) (define-key map "\M-<" 'minibuffer-beginning-of-buffer) - (define-key map [remap recenter-top-bottom] 'minibuffer-recenter-top-bottom) - (define-key map [remap scroll-up-command] 'minibuffer-scroll-up-command) - (define-key map [remap scroll-down-command] 'minibuffer-scroll-down-command) - (define-key map [remap scroll-other-window] 'minibuffer-scroll-other-window) - (define-key map [remap scroll-other-window-down] 'minibuffer-scroll-other-window-down) - (define-key map "\r" 'exit-minibuffer) (define-key map "\n" 'exit-minibuffer)) diff --git a/lisp/subr.el b/lisp/subr.el index de7d919abfe..ca5af0f0ab7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2672,8 +2672,15 @@ floating point support." (defvar read-char-from-minibuffer-map (let ((map (make-sparse-keymap))) (set-keymap-parent map minibuffer-local-map) - (define-key map [remap self-insert-command] - 'read-char-from-minibuffer-insert-char) + + (define-key map [remap self-insert-command] 'read-char-from-minibuffer-insert-char) + + (define-key map [remap recenter-top-bottom] 'minibuffer-recenter-top-bottom) + (define-key map [remap scroll-up-command] 'minibuffer-scroll-up-command) + (define-key map [remap scroll-down-command] 'minibuffer-scroll-down-command) + (define-key map [remap scroll-other-window] 'minibuffer-scroll-other-window) + (define-key map [remap scroll-other-window-down] 'minibuffer-scroll-other-window-down) + map) "Keymap for the `read-char-from-minibuffer' function.")