mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-02 11:21:42 +00:00
Rename split-window-{above-each-other|split-window-side-by-side}
to split-window-below and split-window-right. * lisp/window.el (split-window-below, split-window-right): Rename from split-window-above-each-other and split-window-side-by-side respectively. All callers changed. (split-window-sensibly, split-window-sensibly): Use them. (split-window-keep-point): Doc fix. * lisp/isearch.el: Add isearch-scroll property to split-window-below and split-window-right. * lisp/follow.el (follow-mode): * lisp/vc/pcvs-util.el (cvs-pop-to-buffer-same-frame): * lisp/progmodes/ada-xref.el (ada-gdb-application): * lisp/emulation/vip.el (vip-buffer-in-two-windows): * lisp/image-dired.el (image-dired-dired-with-window-configuration): * lisp/dired-x.el (dired-do-find-marked-files): * lisp/dired.el (dired-pop-to-buffer): * lisp/bs.el (bs--show-with-configuration): * lisp/vc/emerge.el (emerge-setup-windows): * lisp/textmodes/two-column.el (2C-two-columns): * lisp/textmodes/reftex-toc.el (reftex-toc): * lisp/progmodes/gdb-mi.el (gdb-setup-windows): * lisp/progmodes/fortran.el (fortran-window-create): * lisp/net/newst-treeview.el (newsticker--treeview-window-init): * lisp/emulation/ws-mode.el (wordstar-C-o-map, wordstar-mode): * lisp/emulation/tpu-edt.el (tpu-gold-map): * lisp/emulation/crisp.el (crisp-mode-map): * lisp/calendar/calendar.el (calendar-basic-setup): Callers changed.
This commit is contained in:
parent
196e41e4ae
commit
2d197ffbe2
4
etc/NEWS
4
etc/NEWS
@ -1101,8 +1101,8 @@ selected window, signaling an error otherwise. If nil, another window
|
||||
can be used, e.g. if the selected one is strongly dedicated.
|
||||
|
||||
*** `split-window-vertically' and `split-window-horizontally' renamed
|
||||
to `split-window-above-each-other' and `split-window-side-by-side'
|
||||
respectively. The old names are kept as aliases.
|
||||
to `split-window-below' and `split-window-right' respectively.
|
||||
The old names are kept as aliases.
|
||||
|
||||
*** Display actions
|
||||
|
||||
|
@ -1,3 +1,33 @@
|
||||
2011-10-30 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* window.el (split-window-below, split-window-right): Rename from
|
||||
split-window-above-each-other and split-window-side-by-side
|
||||
respectively. All callers changed.
|
||||
(split-window-sensibly, split-window-sensibly): Use them.
|
||||
(split-window-keep-point): Doc fix.
|
||||
|
||||
* isearch.el: Add isearch-scroll property to split-window-below
|
||||
and split-window-right.
|
||||
|
||||
* follow.el (follow-mode):
|
||||
* vc/pcvs-util.el (cvs-pop-to-buffer-same-frame):
|
||||
* progmodes/ada-xref.el (ada-gdb-application):
|
||||
* emulation/vip.el (vip-buffer-in-two-windows):
|
||||
* image-dired.el (image-dired-dired-with-window-configuration):
|
||||
* dired-x.el (dired-do-find-marked-files):
|
||||
* dired.el (dired-pop-to-buffer):
|
||||
* bs.el (bs--show-with-configuration):
|
||||
* vc/emerge.el (emerge-setup-windows):
|
||||
* textmodes/two-column.el (2C-two-columns):
|
||||
* textmodes/reftex-toc.el (reftex-toc):
|
||||
* progmodes/gdb-mi.el (gdb-setup-windows):
|
||||
* progmodes/fortran.el (fortran-window-create):
|
||||
* net/newst-treeview.el (newsticker--treeview-window-init):
|
||||
* emulation/ws-mode.el (wordstar-C-o-map, wordstar-mode):
|
||||
* emulation/tpu-edt.el (tpu-gold-map):
|
||||
* emulation/crisp.el (crisp-mode-map):
|
||||
* calendar/calendar.el (calendar-basic-setup): Callers changed.
|
||||
|
||||
2011-10-29 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* subr.el (y-or-n-p): Add code for batch mode (Bug#9818).
|
||||
|
@ -1414,8 +1414,7 @@ for buffer selection."
|
||||
(bs--restore-window-config)
|
||||
(setq bs--window-config-coming-from (current-window-configuration))
|
||||
(when (> (window-height (selected-window)) 7)
|
||||
(split-window-vertically)
|
||||
(other-window 1)))
|
||||
(select-window (split-window-below))))
|
||||
(bs-show-in-buffer liste)
|
||||
(bs-message-without-log "%s" (bs--current-config-message)))))
|
||||
|
||||
|
@ -720,7 +720,7 @@ See the documentation for `calculator-mode' for more information."
|
||||
;; maybe leave two lines for our window because of the normal
|
||||
;; `raised' modeline in Emacs 21
|
||||
(select-window
|
||||
(split-window-vertically
|
||||
(split-window-below
|
||||
;; If the modeline might interfere with the calculator buffer,
|
||||
;; use 3 lines instead.
|
||||
(if (and (fboundp 'face-attr-construct)
|
||||
|
@ -1330,12 +1330,12 @@ display the generated calendar."
|
||||
;; the right thing in that case.
|
||||
;;
|
||||
;; Is this a wide frame? If so, split it horizontally.
|
||||
(if (window-splittable-p t) (split-window-horizontally))
|
||||
(if (window-splittable-p t) (split-window-right))
|
||||
(pop-to-buffer calendar-buffer)
|
||||
;; Has the window already been split vertically?
|
||||
(when (and (not (window-dedicated-p))
|
||||
(window-full-height-p))
|
||||
(let ((win (split-window-vertically)))
|
||||
(let ((win (split-window-below)))
|
||||
;; In the upper window, show whatever was visible before.
|
||||
;; This looks better than using other-buffer.
|
||||
(switch-to-buffer buff)
|
||||
|
@ -1259,7 +1259,7 @@ Remaining lines go to bottom-most window. The number of files that can be
|
||||
displayed this way is restricted by the height of the current window and
|
||||
`window-min-height'.
|
||||
|
||||
To keep dired buffer displayed, type \\[split-window-vertically] first.
|
||||
To keep dired buffer displayed, type \\[split-window-below] first.
|
||||
To display just marked files, type \\[delete-other-windows] first."
|
||||
(interactive "P")
|
||||
(dired-simultaneous-find-file (dired-get-marked-files) noselect))
|
||||
|
@ -2879,7 +2879,7 @@ or \"* [3 files]\"."
|
||||
(window-splittable-p (selected-window)))
|
||||
;; Try to split the selected window vertically if
|
||||
;; that's possible. (Bug#1806)
|
||||
(split-window-vertically))
|
||||
(split-window-below))
|
||||
;; Otherwise, try to split WINDOW sensibly.
|
||||
(split-window-sensibly window))))
|
||||
pop-up-frames)
|
||||
@ -4128,7 +4128,7 @@ instead.
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
|
||||
;;;;;; "dired-x" "dired-x.el" "0a19e4cb2cadf007be715af1035c9c36")
|
||||
;;;;;; "dired-x" "dired-x.el" "ea7c74fbb7dddf43bb85875018cb59ad")
|
||||
;;; Generated autoloads from dired-x.el
|
||||
|
||||
(autoload 'dired-jump "dired-x" "\
|
||||
|
@ -71,8 +71,8 @@
|
||||
(define-key map [(f2) (left)] 'shrink-window-horizontally)
|
||||
(define-key map [(f2) (right)] 'enlarge-window-horizontally)
|
||||
(define-key map [(f2) (up)] 'shrink-window)
|
||||
(define-key map [(f3) (down)] 'split-window-vertically)
|
||||
(define-key map [(f3) (right)] 'split-window-horizontally)
|
||||
(define-key map [(f3) (down)] 'split-window-below)
|
||||
(define-key map [(f3) (right)] 'split-window-right)
|
||||
|
||||
(define-key map [(f4)] 'delete-window)
|
||||
(define-key map [(control f4)] 'delete-other-windows)
|
||||
|
@ -2362,7 +2362,7 @@ Argument GOLD-BINDING is the Emacs function to be bound to GOLD <KEY>."
|
||||
(edt-bind-gold-key-default "\C-h" 'help-for-help); Just in case.
|
||||
(edt-bind-gold-key-default [f1] 'help-for-help)
|
||||
(edt-bind-gold-key-default [help] 'help-for-help)
|
||||
(edt-bind-gold-key-default "\C-\\" 'split-window-vertically)
|
||||
(edt-bind-gold-key-default "\C-\\" 'split-window-below)
|
||||
|
||||
;; GOLD bindings for regular keys.
|
||||
(edt-bind-gold-key-default "a" 'edt-key-not-assigned)
|
||||
|
@ -459,7 +459,7 @@ Otherwise, use `spell-region'."
|
||||
;; (define-key map "\\" nil) ; \
|
||||
(define-key map "]" 'blink-matching-open) ; ]
|
||||
(define-key map "^" 'tpu-add-at-bol) ; ^
|
||||
(define-key map "_" 'split-window-vertically) ; -
|
||||
(define-key map "_" 'split-window-below) ; -
|
||||
(define-key map "`" 'what-line) ; `
|
||||
(define-key map "a" 'tpu-toggle-newline-and-indent) ; a
|
||||
(define-key map "b" 'tpu-next-buffer) ; b
|
||||
@ -487,7 +487,7 @@ Otherwise, use `spell-region'."
|
||||
(define-key map "y" 'copy-region-as-kill) ; y
|
||||
(define-key map "z" 'suspend-emacs) ; z
|
||||
;; (define-key map "{" nil) ; {
|
||||
(define-key map "|" 'split-window-horizontally) ; |
|
||||
(define-key map "|" 'split-window-right) ; |
|
||||
;; (define-key map "}" nil) ; }
|
||||
(define-key map "~" 'exchange-point-and-mark) ; ~
|
||||
(define-key map "\177" 'delete-window) ; <X]
|
||||
|
@ -1605,7 +1605,7 @@ used. This behavior is controlled by the sign of prefix numeric value."
|
||||
"Show current buffer in two windows."
|
||||
(interactive)
|
||||
(delete-other-windows)
|
||||
(split-window-vertically nil))
|
||||
(split-window-below))
|
||||
|
||||
|
||||
;; searching
|
||||
|
@ -95,9 +95,9 @@
|
||||
(define-key map "\C-r" 'set-fill-column)
|
||||
(define-key map "\C-u" 'keyboard-quit)
|
||||
(define-key map "wd" 'delete-other-windows)
|
||||
(define-key map "wh" 'split-window-horizontally)
|
||||
(define-key map "wh" 'split-window-right)
|
||||
(define-key map "wo" 'other-window)
|
||||
(define-key map "wv" 'split-window-vertically)
|
||||
(define-key map "wv" 'split-window-below)
|
||||
map)
|
||||
"")
|
||||
|
||||
@ -257,9 +257,9 @@ The key bindings are:
|
||||
C-o r set-fill-column
|
||||
C-o C-u keyboard-quit
|
||||
C-o wd delete-other-windows
|
||||
C-o wh split-window-horizontally
|
||||
C-o wh split-window-right
|
||||
C-o wo other-window
|
||||
C-o wv split-window-vertically
|
||||
C-o wv split-window-below
|
||||
|
||||
C-q 0 ws-find-marker-0
|
||||
C-q 1 ws-find-marker-1
|
||||
|
@ -509,7 +509,7 @@ and being able to use 144 lines instead of the normal 72... (your
|
||||
mileage may vary).
|
||||
|
||||
To split one large window into two side-by-side windows, the commands
|
||||
`\\[split-window-horizontally]' or \
|
||||
`\\[split-window-right]' or \
|
||||
`M-x follow-delete-other-windows-and-split' can be used.
|
||||
|
||||
Only windows displayed in the same frame follow each other.
|
||||
@ -662,7 +662,7 @@ in your `~/.emacs' file, replacing [f7] by your favourite key:
|
||||
(< (prefix-numeric-value arg) 0))))
|
||||
(start (window-start)))
|
||||
(delete-other-windows)
|
||||
(split-window-horizontally)
|
||||
(split-window-right)
|
||||
(if other
|
||||
(progn
|
||||
(other-window 1)
|
||||
|
@ -782,13 +782,12 @@ calling `image-dired-restore-window-configuration'."
|
||||
(dired dir)
|
||||
(delete-other-windows)
|
||||
(when (not arg)
|
||||
(split-window-horizontally)
|
||||
(split-window-right)
|
||||
(setq truncate-lines t)
|
||||
(save-excursion
|
||||
(other-window 1)
|
||||
(switch-to-buffer buf)
|
||||
(split-window-vertically)
|
||||
(other-window 1)
|
||||
(select-window (split-window-below))
|
||||
(switch-to-buffer buf2)
|
||||
(other-window -2)))))
|
||||
|
||||
|
@ -1804,9 +1804,13 @@ Scroll-bar or mode-line events are processed appropriately."
|
||||
;; Commands which change the window layout
|
||||
(put 'delete-other-windows 'isearch-scroll t)
|
||||
(put 'balance-windows 'isearch-scroll t)
|
||||
(put 'split-window-right 'isearch-scroll t)
|
||||
(put 'split-window-below 'isearch-scroll t)
|
||||
(put 'enlarge-window 'isearch-scroll t)
|
||||
|
||||
;; Aliases for split-window-*
|
||||
(put 'split-window-vertically 'isearch-scroll t)
|
||||
(put 'split-window-horizontally 'isearch-scroll t)
|
||||
(put 'enlarge-window 'isearch-scroll t)
|
||||
|
||||
;; Universal argument commands
|
||||
(put 'universal-argument 'isearch-scroll t)
|
||||
|
@ -101,13 +101,13 @@
|
||||
:help ,(purecopy "Make selected window fill whole frame")))
|
||||
|
||||
(define-key menu [new-window-on-right]
|
||||
`(menu-item ,(purecopy "New Window on Right") split-window-side-by-side
|
||||
`(menu-item ,(purecopy "New Window on Right") split-window-right
|
||||
:enable (and (menu-bar-menu-frame-live-and-visible-p)
|
||||
(menu-bar-non-minibuffer-window-p))
|
||||
:help ,(purecopy "Make new window on right of selected one")))
|
||||
|
||||
(define-key menu [new-window-below]
|
||||
`(menu-item ,(purecopy "New Window Below") split-window-above-each-other
|
||||
`(menu-item ,(purecopy "New Window Below") split-window-below
|
||||
:enable (and (menu-bar-menu-frame-live-and-visible-p)
|
||||
(menu-bar-non-minibuffer-window-p))
|
||||
:help ,(purecopy "Make new window below selected one")))
|
||||
|
@ -2018,10 +2018,10 @@ POS gives the position where EVENT occurred."
|
||||
(setq newsticker--treeview-windows nil)
|
||||
(setq newsticker--treeview-buffers nil)
|
||||
(delete-other-windows)
|
||||
(split-window-horizontally newsticker-treeview-treewindow-width)
|
||||
(split-window-right newsticker-treeview-treewindow-width)
|
||||
(add-to-list 'newsticker--treeview-windows (selected-window) t)
|
||||
(other-window 1)
|
||||
(split-window-vertically newsticker-treeview-listwindow-height)
|
||||
(split-window-below newsticker-treeview-listwindow-height)
|
||||
(add-to-list 'newsticker--treeview-windows (selected-window) t)
|
||||
(other-window 1)
|
||||
(add-to-list 'newsticker--treeview-windows (selected-window) t)
|
||||
|
@ -1438,7 +1438,7 @@ project file."
|
||||
;; is going to have some relevant information.
|
||||
(if (or (not (string-match "gvd" (comint-arguments cmd 0 0)))
|
||||
(string-match "--tty" cmd))
|
||||
(split-window-vertically))
|
||||
(split-window-below))
|
||||
(switch-to-buffer buffer)
|
||||
)))
|
||||
|
||||
|
@ -1097,7 +1097,7 @@ See also `fortran-window-create-momentarily'."
|
||||
(scroll-bar-width (- (nth 2 window-edges)
|
||||
(car window-edges)
|
||||
(window-width))))
|
||||
(split-window-horizontally (+ fortran-line-length scroll-bar-width)))
|
||||
(split-window-right (+ fortran-line-length scroll-bar-width)))
|
||||
(other-window 1)
|
||||
(switch-to-buffer " fortran-window-extra" t)
|
||||
(select-window (previous-window))))
|
||||
|
@ -4028,7 +4028,7 @@ window is dedicated."
|
||||
(let ((win0 (selected-window))
|
||||
(win1 (split-window nil ( / ( * (window-height) 3) 4)))
|
||||
(win2 (split-window nil ( / (window-height) 3)))
|
||||
(win3 (split-window-horizontally)))
|
||||
(win3 (split-window-right)))
|
||||
(gdb-set-window-buffer (gdb-locals-buffer-name) nil win3)
|
||||
(select-window win2)
|
||||
(set-window-buffer
|
||||
@ -4041,12 +4041,12 @@ window is dedicated."
|
||||
;; can't find a source file.
|
||||
(list-buffers-noselect))))
|
||||
(setq gdb-source-window (selected-window))
|
||||
(let ((win4 (split-window-horizontally)))
|
||||
(let ((win4 (split-window-right)))
|
||||
(gdb-set-window-buffer
|
||||
(gdb-get-buffer-create 'gdb-inferior-io) nil win4))
|
||||
(select-window win1)
|
||||
(gdb-set-window-buffer (gdb-stack-buffer-name))
|
||||
(let ((win5 (split-window-horizontally)))
|
||||
(let ((win5 (split-window-right)))
|
||||
(gdb-set-window-buffer (if gdb-show-threads-by-default
|
||||
(gdb-threads-buffer-name)
|
||||
(gdb-breakpoints-buffer-name))
|
||||
|
@ -111,7 +111,7 @@ Select the first of these windows, displaying the first of the buffers."
|
||||
(while (progn
|
||||
(switch-to-buffer (car buffers))
|
||||
(setq buffers (cdr buffers)))
|
||||
(split-window-vertically lines-per-buffer)
|
||||
(split-window-below lines-per-buffer)
|
||||
(other-window 1))
|
||||
(select-window (frame-first-window frame)))
|
||||
(select-frame old-frame))))
|
||||
|
@ -247,10 +247,10 @@ When called with a raw C-u prefix, rescan the document first."
|
||||
|
||||
(unless unsplittable
|
||||
(if reftex-toc-split-windows-horizontally
|
||||
(split-window-horizontally
|
||||
(split-window-right
|
||||
(floor (* (window-width)
|
||||
reftex-toc-split-windows-fraction)))
|
||||
(split-window-vertically
|
||||
(split-window-below
|
||||
(floor (* (window-height)
|
||||
reftex-toc-split-windows-fraction)))))
|
||||
|
||||
|
@ -333,7 +333,7 @@ first and the associated buffer to its right."
|
||||
;; first go to full width, so that we can certainly split into two windows
|
||||
(unless (window-full-width-p)
|
||||
(enlarge-window 99999 t))
|
||||
(split-window-horizontally
|
||||
(split-window-right
|
||||
(max window-min-width (min 2C-window-width
|
||||
(- (frame-width) window-min-width))))
|
||||
(if (2C-other)
|
||||
|
@ -298,7 +298,7 @@ LEFT and RIGHT are the elements to compare."
|
||||
(isearch-backward [?\C-r])
|
||||
|
||||
;; * MULTIPLE WINDOWS
|
||||
(split-window-above-each-other [?\C-x ?2])
|
||||
(split-window-below [?\C-x ?2])
|
||||
(scroll-other-window [?\C-\M-v])
|
||||
(other-window [?\C-x ?o])
|
||||
(find-file-other-window [?\C-x ?4 ?\C-f])
|
||||
|
@ -1354,8 +1354,8 @@ Otherwise, the A or B file present is copied to the output file."
|
||||
(delete-other-windows)
|
||||
(switch-to-buffer merge-buffer)
|
||||
(emerge-refresh-mode-line)
|
||||
(split-window-vertically)
|
||||
(split-window-horizontally)
|
||||
(split-window-below)
|
||||
(split-window-right)
|
||||
(switch-to-buffer buffer-A)
|
||||
(if pos
|
||||
(goto-char (point-min)))
|
||||
@ -2121,7 +2121,7 @@ Use C-u l to reset the windows afterward."
|
||||
(delete-other-windows)
|
||||
(let ((temp-buffer-show-function
|
||||
(lambda (buf)
|
||||
(split-window-vertically)
|
||||
(split-window-below)
|
||||
(switch-to-buffer buf)
|
||||
(other-window 1))))
|
||||
(with-output-to-temp-buffer "*Help*"
|
||||
|
@ -88,7 +88,7 @@ try to split a new window instead."
|
||||
(pop-up-frames nil))
|
||||
(or (let ((buf (get-buffer-window buf))) (and buf (select-window buf)))
|
||||
(and pop-up-windows
|
||||
(ignore-errors (select-window (split-window-vertically)))
|
||||
(ignore-errors (select-window (split-window-below)))
|
||||
(switch-to-buffer buf))
|
||||
(pop-to-buffer (current-buffer)))))
|
||||
|
||||
|
@ -3262,39 +3262,28 @@ frame. The selected window is not changed by this function."
|
||||
|
||||
;; I think this should be the default; I think people will prefer it--rms.
|
||||
(defcustom split-window-keep-point t
|
||||
"If non-nil, \\[split-window-above-each-other] keeps the original point \
|
||||
in both children.
|
||||
This is often more convenient for editing.
|
||||
If nil, adjust point in each of the two windows to minimize redisplay.
|
||||
This is convenient on slow terminals, but point can move strangely.
|
||||
|
||||
This option applies only to `split-window-above-each-other' and
|
||||
functions that call it. `split-window' always keeps the original
|
||||
point in both children."
|
||||
"If non-nil, \\[split-window-below] preserves point in the new window.
|
||||
If nil, adjust point in the two windows to minimize redisplay.
|
||||
This option applies only to `split-window-below' and functions
|
||||
that call it. The low-level `split-window' function always keeps
|
||||
the original point in both windows."
|
||||
:type 'boolean
|
||||
:group 'windows)
|
||||
|
||||
(defun split-window-above-each-other (&optional size)
|
||||
"Split selected window into two windows, one above the other.
|
||||
The upper window gets SIZE lines and the lower one gets the rest.
|
||||
SIZE negative means the lower window gets -SIZE lines and the
|
||||
upper one the rest. With no argument, split windows equally or
|
||||
close to it. Both windows display the same buffer, now current.
|
||||
(defun split-window-below (&optional size)
|
||||
"Split the selected window into two windows, one above the other.
|
||||
The selected window is above. The newly split-off window is
|
||||
below, and displays the same buffer. Return the new window.
|
||||
|
||||
If the variable `split-window-keep-point' is non-nil, both new
|
||||
windows will get the same value of point as the selected window.
|
||||
This is often more convenient for editing. The upper window is
|
||||
the selected window.
|
||||
If optional argument SIZE is omitted or nil, both windows get the
|
||||
same height, or close to it. If SIZE is positive, the upper
|
||||
\(selected) window gets SIZE lines. If SIZE is negative, the
|
||||
lower (new) window gets -SIZE lines.
|
||||
|
||||
Otherwise, we choose window starts so as to minimize the amount of
|
||||
redisplay; this is convenient on slow terminals. The new selected
|
||||
window is the one that the current value of point appears in. The
|
||||
value of point can change if the text around point is hidden by the
|
||||
new mode line.
|
||||
|
||||
Regardless of the value of `split-window-keep-point', the upper
|
||||
window is the original one and the return value is the new, lower
|
||||
window."
|
||||
If the variable `split-window-keep-point' is non-nil, both
|
||||
windows get the same value of point as the selected window.
|
||||
Otherwise, the window starts are chosen so as to minimize the
|
||||
amount of redisplay; this is convenient on slow terminals."
|
||||
(interactive "P")
|
||||
(let ((old-window (selected-window))
|
||||
(old-point (point))
|
||||
@ -3328,19 +3317,21 @@ window."
|
||||
(set-window-parameter new-window 'quit-restore quit-restore)))
|
||||
new-window))
|
||||
|
||||
(defalias 'split-window-vertically 'split-window-above-each-other)
|
||||
(defalias 'split-window-vertically 'split-window-below)
|
||||
|
||||
(defun split-window-side-by-side (&optional size)
|
||||
"Split selected window into two windows side by side.
|
||||
The selected window becomes the left one and gets SIZE columns.
|
||||
SIZE negative means the right window gets -SIZE columns.
|
||||
(defun split-window-right (&optional size)
|
||||
"Split the selected window into two side-by-side windows.
|
||||
The selected window is on the left. The newly split-off window
|
||||
is on the right, and displays the same buffer. Return the new
|
||||
window.
|
||||
|
||||
SIZE includes the width of the window's scroll bar; if there are
|
||||
no scroll bars, it includes the width of the divider column to
|
||||
the window's right, if any. SIZE omitted or nil means split
|
||||
window equally.
|
||||
|
||||
The selected window remains selected. Return the new window."
|
||||
If optional argument SIZE is omitted or nil, both windows get the
|
||||
same width, or close to it. If SIZE is positive, the left-hand
|
||||
\(selected) window gets SIZE columns. If SIZE is negative, the
|
||||
right-hand (new) window gets -SIZE columns. Here, SIZE includes
|
||||
the width of the window's scroll bar; if there are no scroll
|
||||
bars, it includes the width of the divider column to the window's
|
||||
right, if any."
|
||||
(interactive "P")
|
||||
(let ((old-window (selected-window))
|
||||
(size (and size (prefix-numeric-value size)))
|
||||
@ -3355,7 +3346,7 @@ The selected window remains selected. Return the new window."
|
||||
(set-window-parameter new-window 'quit-restore quit-restore)))
|
||||
new-window))
|
||||
|
||||
(defalias 'split-window-horizontally 'split-window-side-by-side)
|
||||
(defalias 'split-window-horizontally 'split-window-right)
|
||||
|
||||
;;; Balancing windows.
|
||||
|
||||
@ -4431,11 +4422,11 @@ split."
|
||||
(or (and (window-splittable-p window)
|
||||
;; Split window vertically.
|
||||
(with-selected-window window
|
||||
(split-window-vertically)))
|
||||
(split-window-below)))
|
||||
(and (window-splittable-p window t)
|
||||
;; Split window horizontally.
|
||||
(with-selected-window window
|
||||
(split-window-horizontally)))
|
||||
(split-window-right)))
|
||||
(and (eq window (frame-root-window (window-frame window)))
|
||||
(not (window-minibuffer-p window))
|
||||
;; If WINDOW is the only window on its frame and is not the
|
||||
@ -4444,7 +4435,7 @@ split."
|
||||
(let ((split-height-threshold 0))
|
||||
(when (window-splittable-p window)
|
||||
(with-selected-window window
|
||||
(split-window-vertically)))))))
|
||||
(split-window-below)))))))
|
||||
|
||||
(defun window--try-to-split-window (window)
|
||||
"Try to split WINDOW.
|
||||
@ -5741,8 +5732,8 @@ Otherwise, consult the value of `truncate-partial-width-windows'
|
||||
;; change these.
|
||||
(define-key ctl-x-map "0" 'delete-window)
|
||||
(define-key ctl-x-map "1" 'delete-other-windows)
|
||||
(define-key ctl-x-map "2" 'split-window-above-each-other)
|
||||
(define-key ctl-x-map "3" 'split-window-side-by-side)
|
||||
(define-key ctl-x-map "2" 'split-window-below)
|
||||
(define-key ctl-x-map "3" 'split-window-right)
|
||||
(define-key ctl-x-map "o" 'other-window)
|
||||
(define-key ctl-x-map "^" 'enlarge-window)
|
||||
(define-key ctl-x-map "}" 'enlarge-window-horizontally)
|
||||
|
Loading…
Reference in New Issue
Block a user