bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56767: New commands to split frame


From: Juri Linkov
Subject: bug#56767: New commands to split frame
Date: Mon, 25 Jul 2022 22:32:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

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))
+
 
 ;;; Balancing windows.
 
```





reply via email to

[Prev in Thread] Current Thread [Next in Thread]