[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56767: New commands to split frame
From: |
Lars Ingebrigtsen |
Subject: |
bug#56767: New commands to split frame |
Date: |
Tue, 26 Jul 2022 14:41:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Juri Linkov <juri@linkov.net> writes:
> Since we already have the commands to split the current window,
> shouldn't we also have the commands to split the current frame:
>
> ```
> diff --git a/lisp/window.el b/lisp/window.el
> index 4d88ffa903..86dec25cdf 100644
> --- a/lisp/window.el
> +++ b/lisp/window.el
> @@ -5754,6 +5754,17 @@ split-window-right
> new-window))
>
> (defalias 'split-window-horizontally 'split-window-right)
> +
> +(defun split-frame-vertically (&optional size)
> + "Like `split-window-vertically' but splits frame instead of window."
> + (interactive "P")
> + (split-window (frame-root-window) size))
> +
> +(defun split-frame-horizontally (&optional size)
> + "Like `split-window-horizontally' but splits frame instead of window."
> + (interactive "P")
> + (split-window (frame-root-window) size t))
I don't think I understand what this is supposed to do. When testing
it, it just splits the topmost window (no matter what window is
selected), and I don't undertand why anybody would want that in
particular.