>From c1c9f28a03d46595a53561036cf0fb57e340d8e1 Mon Sep 17 00:00:00 2001 From: Hugo Heagren Date: Tue, 26 Jul 2022 22:37:21 +0100 Subject: [PATCH 2/6] split-root-window-below: New function * lisp/window.el (split-root-window-below): New function to split whole frame. * doc/lispref/windows.texi (Splitting Windows): Add documentation for `split-root-window-below'. --- doc/lispref/windows.texi | 7 +++++++ lisp/window.el | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 255e33ad0d..51e54ebcd4 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -1485,6 +1485,13 @@ Splitting Windows negative, the lower window gets @minus{}@var{size} lines. @end deffn +@deffn Command split-root-window-below &optional size +This function splits the whole frame in two. The current window +configuration is retained on the top, and a new window is created +below, taking up the whole width of the frame. @var{size} is treated +as by @code{split-window-below}. +@end deffn + @defopt split-window-keep-point If the value of this variable is non-@code{nil} (the default), @code{split-window-below} behaves as described above. diff --git a/lisp/window.el b/lisp/window.el index 69089e63f5..556fcddf47 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5726,6 +5726,14 @@ split-window-below (defalias 'split-window-vertically 'split-window-below) +(defun split-root-window-below (&optional size) + "Split root window of current frame in two. +The current window configuration is retained in the top window, +the lower window takes up the whole width of the frame. SIZE is +handled as in `split-window-below'." + (interactive "P") + (split-window-below size (frame-root-window))) + (defun split-window-right (&optional size) "Split the selected window into two side-by-side windows. The selected window is on the left. The newly split-off window -- 2.20.1