aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-12-09 00:19:43 +0200
committerJuri Linkov2019-12-09 00:19:43 +0200
commit9ea3137bc8601cac9465e953e4e79ee15963e24a (patch)
treeec94fed8c87163b834158b8f99d6451f039c85ce
parentfe7ae74c0b0b40dff4af8fa46da8f5f537bb99a0 (diff)
downloademacs-9ea3137bc8601cac9465e953e4e79ee15963e24a.tar.gz
emacs-9ea3137bc8601cac9465e953e4e79ee15963e24a.zip
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)
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/minibuffer.el6
-rw-r--r--lisp/subr.el11
3 files changed, 9 insertions, 11 deletions
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.
765 765
766** Minibuffer 766** Minibuffer
767 767
768*** Scrolling and recentering commands in the minibuffer are invoked
769on the original window (that was selected before activating the minibuffer).
770
771+++ 768+++
772*** A new user option, 'minibuffer-beginning-of-buffer-movement', has 769*** A new user option, 'minibuffer-beginning-of-buffer-movement', has
773been introduced to allow controlling how the 'M-<' command works in 770been 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'."
2244 (define-key map "\C-g" 'abort-recursive-edit) 2244 (define-key map "\C-g" 'abort-recursive-edit)
2245 (define-key map "\M-<" 'minibuffer-beginning-of-buffer) 2245 (define-key map "\M-<" 'minibuffer-beginning-of-buffer)
2246 2246
2247 (define-key map [remap recenter-top-bottom] 'minibuffer-recenter-top-bottom)
2248 (define-key map [remap scroll-up-command] 'minibuffer-scroll-up-command)
2249 (define-key map [remap scroll-down-command] 'minibuffer-scroll-down-command)
2250 (define-key map [remap scroll-other-window] 'minibuffer-scroll-other-window)
2251 (define-key map [remap scroll-other-window-down] 'minibuffer-scroll-other-window-down)
2252
2253 (define-key map "\r" 'exit-minibuffer) 2247 (define-key map "\r" 'exit-minibuffer)
2254 (define-key map "\n" 'exit-minibuffer)) 2248 (define-key map "\n" 'exit-minibuffer))
2255 2249
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."
2672(defvar read-char-from-minibuffer-map 2672(defvar read-char-from-minibuffer-map
2673 (let ((map (make-sparse-keymap))) 2673 (let ((map (make-sparse-keymap)))
2674 (set-keymap-parent map minibuffer-local-map) 2674 (set-keymap-parent map minibuffer-local-map)
2675 (define-key map [remap self-insert-command] 2675
2676 'read-char-from-minibuffer-insert-char) 2676 (define-key map [remap self-insert-command] 'read-char-from-minibuffer-insert-char)
2677
2678 (define-key map [remap recenter-top-bottom] 'minibuffer-recenter-top-bottom)
2679 (define-key map [remap scroll-up-command] 'minibuffer-scroll-up-command)
2680 (define-key map [remap scroll-down-command] 'minibuffer-scroll-down-command)
2681 (define-key map [remap scroll-other-window] 'minibuffer-scroll-other-window)
2682 (define-key map [remap scroll-other-window-down] 'minibuffer-scroll-other-window-down)
2683
2677 map) 2684 map)
2678 "Keymap for the `read-char-from-minibuffer' function.") 2685 "Keymap for the `read-char-from-minibuffer' function.")
2679 2686