]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'split-root-window-right' and 'split-root-window-below'
authorEli Zaretskii <eliz@gnu.org>
Mon, 25 Dec 2023 12:59:26 +0000 (14:59 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 2 Jan 2024 07:17:54 +0000 (08:17 +0100)
* lisp/window.el (split-root-window-right)
(split-root-window-below): Fix the 'interactive' spec to avoid
misbehaving when invoked with no prefix argument.  (Bug#67452)

(cherry picked from commit be8a7155b48198b08bbc4844b2ce60c127405fb7)

lisp/window.el

index 4ef55a8e947900fd0f3289238f19c0cd9122a5f9..4812e23dbe9c8391ed313fc39057c8af6bcb8ac0 100644 (file)
@@ -5737,7 +5737,8 @@ 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', and interactively is the
 prefix numeric argument."
-  (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)
@@ -5777,7 +5778,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' and interactively, is the prefix numeric argument."
-  (interactive "p")
+  (interactive `(,(when current-prefix-arg
+                    (prefix-numeric-value current-prefix-arg))))
   (split-window-right size (frame-root-window)))
 \f
 ;;; Balancing windows.