1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

(split-window-horizontally): If size is negative, measure from the right.

This commit is contained in:
Karl Heuer 1994-08-18 21:03:37 +00:00
parent 21d5959fe7
commit 0ef2c2f2e6

View file

@ -124,10 +124,14 @@ new mode line."
(defun split-window-horizontally (&optional arg)
"Split current window into two windows side by side.
This window becomes the leftmost of the two, and gets
ARG columns. No arg means split equally."
This window becomes the leftmost of the two, and gets ARG columns.
Negative arg means select the size of the rightmost window instead.
No arg means split equally."
(interactive "P")
(split-window nil (and arg (prefix-numeric-value arg)) t))
(let ((size (and arg (prefix-numeric-value arg))))
(and size (< size 0)
(setq size (+ (window-width) size)))
(split-window nil size t)))
(defun enlarge-window-horizontally (arg)
"Make current window ARG columns wider."