aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/window.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/window.el b/lisp/window.el
index bab282a265c..4ebe8b50e41 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -124,10 +124,14 @@ new mode line."
124 124
125(defun split-window-horizontally (&optional arg) 125(defun split-window-horizontally (&optional arg)
126 "Split current window into two windows side by side. 126 "Split current window into two windows side by side.
127This window becomes the leftmost of the two, and gets 127This window becomes the leftmost of the two, and gets ARG columns.
128ARG columns. No arg means split equally." 128Negative arg means select the size of the rightmost window instead.
129No arg means split equally."
129 (interactive "P") 130 (interactive "P")
130 (split-window nil (and arg (prefix-numeric-value arg)) t)) 131 (let ((size (and arg (prefix-numeric-value arg))))
132 (and size (< size 0)
133 (setq size (+ (window-width) size)))
134 (split-window nil size t)))
131 135
132(defun enlarge-window-horizontally (arg) 136(defun enlarge-window-horizontally (arg)
133 "Make current window ARG columns wider." 137 "Make current window ARG columns wider."