Subject: bug#67452: 30.0.50; [PATCH] Make split-root-window functions handle argument

From: Cy <[email-masked]>
Date: Sun, 26 Nov 2023 00:42:54 -0800

Hello,

I noticed the split-root-window-below and split-root-window-right 
commands fail when passing an argument using C-u:

split-root-window-right: Wrong type argument: number-or-marker-p, (4)

I have edited these functions to remedy this error, and attached a 
patch. I hope that the changes are satisfactory.

Best,

Cy
From e8f3751a085962c85e5f360469ce00229f4ea60f Mon Sep 17 00:00:00 2001
From: Cy <[email-masked]>
Date: Sun, 26 Nov 2023 00:34:25 -0800
Subject: [PATCH] Make split-root-window functions handle argument

* lisp/window.el (split-root-window-below, split-root-window-right): Handle prefix argument passed by C-u
---
 lisp/window.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/window.el b/lisp/window.el
index 0c5ccf167dc..22ed8cc2bdf 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5735,7 +5735,8 @@ amount of redisplay; this is convenient on slow terminals."
 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")
+  (interactive (when current-prefix-arg
+                 (prefix-numeric-value current-prefix-arg)))
   (split-window-below size (frame-root-window)))
 
 (defun split-window-right (&optional size window-to-split)
@@ -5775,7 +5776,8 @@ The current window configuration is retained within the left
 window, and a new window is created on the right, taking up the
 whole height of the frame.  SIZE is treated as by
 `split-window-right'."
-  (interactive "P")
+  (interactive (when current-prefix-arg
+                 (prefix-numeric-value current-prefix-arg)))
   (split-window-right size (frame-root-window)))
 
 ;;; Balancing windows.
-- 
2.43.0