all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Cy <cycoding23@gmail.com>
To: 67452@debbugs.gnu.org
Subject: bug#67452: 30.0.50; [PATCH] Make split-root-window functions handle argument
Date: Sun, 26 Nov 2023 00:42:54 -0800	[thread overview]
Message-ID: <ee0d53a8-7235-4d2b-94ff-e19c1be616ca@gmail.com> (raw)

[-- 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


             reply	other threads:[~2023-11-26  8:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-26  8:42 Cy [this message]
2023-11-26 11:01 ` bug#67452: 30.0.50; [PATCH] Make split-root-window functions handle argument 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee0d53a8-7235-4d2b-94ff-e19c1be616ca@gmail.com \
    --to=cycoding23@gmail.com \
    --cc=67452@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.