aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-11-29 16:14:03 +0200
committerEli Zaretskii2023-11-29 16:14:03 +0200
commitcd477bf07d8d996b90e02b5222248264cd6d5c39 (patch)
tree78993c10360552c8a71bdc4f708a179bb0e10dbe
parent2e5d47f578aa0b60355cc23eda60e2b1d200dce9 (diff)
downloademacs-cd477bf07d8d996b90e02b5222248264cd6d5c39.tar.gz
emacs-cd477bf07d8d996b90e02b5222248264cd6d5c39.zip
Fix behavior of 'split-root-window-*' with 'C-u'
* lisp/window.el (split-root-window-below) (split-root-window-right): Fix the 'interactive' form to work with raw 'C-u' as well. (Bug#67459) (split-window-below, split-window-right, split-root-window-below) (split-root-window-right): Doc fix.
-rw-r--r--lisp/window.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 16f16a75418..35de790d85e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5668,7 +5668,8 @@ Return the new window.
5668If optional argument SIZE is omitted or nil, both windows get the 5668If optional argument SIZE is omitted or nil, both windows get the
5669same height, or close to it. If SIZE is positive, the upper 5669same height, or close to it. If SIZE is positive, the upper
5670\(selected) window gets SIZE lines. If SIZE is negative, the 5670\(selected) window gets SIZE lines. If SIZE is negative, the
5671lower (new) window gets -SIZE lines. 5671lower (new) window gets -SIZE lines. Interactively, SIZE is
5672the prefix numeric argument.
5672 5673
5673If the variable `split-window-keep-point' is non-nil, both 5674If the variable `split-window-keep-point' is non-nil, both
5674windows get the same value of point as the WINDOW-TO-SPLIT. 5675windows get the same value of point as the WINDOW-TO-SPLIT.
@@ -5720,8 +5721,9 @@ amount of redisplay; this is convenient on slow terminals."
5720 "Split root window of current frame in two. 5721 "Split root window of current frame in two.
5721The current window configuration is retained in the top window, 5722The current window configuration is retained in the top window,
5722the lower window takes up the whole width of the frame. SIZE is 5723the lower window takes up the whole width of the frame. SIZE is
5723handled as in `split-window-below'." 5724handled as in `split-window-below', and interactively is the
5724 (interactive "P") 5725prefix numeric argument."
5726 (interactive "p")
5725 (split-window-below size (frame-root-window))) 5727 (split-window-below size (frame-root-window)))
5726 5728
5727(defun split-window-right (&optional size window-to-split) 5729(defun split-window-right (&optional size window-to-split)
@@ -5738,7 +5740,7 @@ same width, or close to it. If SIZE is positive, the left-hand
5738right-hand (new) window gets -SIZE columns. Here, SIZE includes 5740right-hand (new) window gets -SIZE columns. Here, SIZE includes
5739the width of the window's scroll bar; if there are no scroll 5741the width of the window's scroll bar; if there are no scroll
5740bars, it includes the width of the divider column to the window's 5742bars, it includes the width of the divider column to the window's
5741right, if any." 5743right, if any. Interactively, SIZE is the prefix numeric argument."
5742 (interactive `(,(when current-prefix-arg 5744 (interactive `(,(when current-prefix-arg
5743 (prefix-numeric-value current-prefix-arg)) 5745 (prefix-numeric-value current-prefix-arg))
5744 ,(selected-window))) 5746 ,(selected-window)))
@@ -5760,8 +5762,8 @@ right, if any."
5760The current window configuration is retained within the left 5762The current window configuration is retained within the left
5761window, and a new window is created on the right, taking up the 5763window, and a new window is created on the right, taking up the
5762whole height of the frame. SIZE is treated as by 5764whole height of the frame. SIZE is treated as by
5763`split-window-right'." 5765`split-window-right' and interactively, is the prefix numeric argument."
5764 (interactive "P") 5766 (interactive "p")
5765 (split-window-right size (frame-root-window))) 5767 (split-window-right size (frame-root-window)))
5766 5768
5767;;; Balancing windows. 5769;;; Balancing windows.