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:
parent
21d5959fe7
commit
0ef2c2f2e6
1 changed files with 7 additions and 3 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue