summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-09-12 07:30:07 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-09-12 07:34:13 -0700
commit1c13ecae6623a0703c4ff65dbccd311760380c51 (patch)
tree0a1e14ede1e5a7a4b1c5ea3cb4583f55a620020f
parent82530902931416603340feb32cb186173ec2d46d (diff)
downloademacs-1c13ecae6623a0703c4ff65dbccd311760380c51.tar.gz
Add new C-x w prefix map
* window.el (window-prefix-map): New map. (ctl-x-map): Unbind split-root-window-below and split-root-window-right. Bind window-prefix-map to C-x w.
-rw-r--r--lisp/window.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 67a4a4bbf2f..d5f42dd10b4 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10558,8 +10558,6 @@ displaying that processes's buffer."
(define-key ctl-x-map "{" 'shrink-window-horizontally)
(define-key ctl-x-map "-" 'shrink-window-if-larger-than-buffer)
(define-key ctl-x-map "+" 'balance-windows)
-(define-key ctl-x-map "7" 'split-root-window-below)
-(define-key ctl-x-map "9" 'split-root-window-right)
(define-key ctl-x-4-map "0" 'kill-buffer-and-window)
(define-key ctl-x-4-map "1" 'same-window-prefix)
(define-key ctl-x-4-map "4" 'other-window-prefix)
@@ -10590,6 +10588,16 @@ displaying that processes's buffer."
(put 'shrink-window-horizontally 'repeat-map 'resize-window-repeat-map)
(put 'shrink-window 'repeat-map 'resize-window-repeat-map)
+(defvar-keymap window-prefix-map
+ :doc "Keymap for subcommands of \\`C-x w'."
+ "2" #'split-root-window-below
+ "3" #'split-root-window-right
+ "s" #'window-toggle-side-windows
+ "f" #'tear-off-window
+ "-" #'fit-window-to-buffer
+ "0" #'delete-windows-on)
+(define-key ctl-x-map "w" window-prefix-map)
+
(provide 'window)
;;; window.el ends here