unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#67452: 30.0.50; [PATCH] Make split-root-window functions handle argument
@ 2023-11-26  8:42 Cy
  2023-11-26 11:01 ` Eli Zaretskii
       [not found] ` <handler.67452.D67452.17012674078751.notifdone@debbugs.gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Cy @ 2023-11-26  8:42 UTC (permalink / raw)
  To: 67452

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

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

[-- Attachment #2: 0001-Make-split-root-window-functions-handle-argument.patch --]
[-- Type: text/x-patch, Size: 1443 bytes --]

From e8f3751a085962c85e5f360469ce00229f4ea60f Mon Sep 17 00:00:00 2001
From: Cy <cycoding23@gmail.com>
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)))
 \f
 ;;; Balancing windows.
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-30  7:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-26  8:42 bug#67452: 30.0.50; [PATCH] Make split-root-window functions handle argument Cy
2023-11-26 11:01 ` Eli Zaretskii
2023-11-27  9:20   ` martin rudalics
2023-11-29 14:16     ` Eli Zaretskii
     [not found] ` <handler.67452.D67452.17012674078751.notifdone@debbugs.gnu.org>
2023-12-24 17:41   ` Juri Linkov
2023-12-25 13:00     ` Eli Zaretskii
2023-12-30  7:43       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).