[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106241: Rename split-window-{above-e
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106241: Rename split-window-{above-each-other|split-window-side-by-side} |
Date: |
Sun, 30 Oct 2011 09:56:03 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106241
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2011-10-30 09:56:03 +0800
message:
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.
modified:
etc/NEWS
lisp/ChangeLog
lisp/bs.el
lisp/calculator.el
lisp/calendar/calendar.el
lisp/dired-x.el
lisp/dired.el
lisp/emulation/crisp.el
lisp/emulation/edt.el
lisp/emulation/tpu-edt.el
lisp/emulation/vip.el
lisp/emulation/ws-mode.el
lisp/follow.el
lisp/image-dired.el
lisp/isearch.el
lisp/menu-bar.el
lisp/net/newst-treeview.el
lisp/progmodes/ada-xref.el
lisp/progmodes/fortran.el
lisp/progmodes/gdb-mi.el
lisp/talk.el
lisp/textmodes/reftex-toc.el
lisp/textmodes/two-column.el
lisp/tutorial.el
lisp/vc/emerge.el
lisp/vc/pcvs-util.el
lisp/window.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2011-10-29 00:41:20 +0000
+++ b/etc/NEWS 2011-10-30 01:56:03 +0000
@@ -1101,8 +1101,8 @@
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
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-10-29 08:41:39 +0000
+++ b/lisp/ChangeLog 2011-10-30 01:56:03 +0000
@@ -1,3 +1,33 @@
+2011-10-30 Chong Yidong <address@hidden>
+
+ * 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 <address@hidden>
* subr.el (y-or-n-p): Add code for batch mode (Bug#9818).
=== modified file 'lisp/bs.el'
--- a/lisp/bs.el 2011-07-14 01:40:30 +0000
+++ b/lisp/bs.el 2011-10-30 01:56:03 +0000
@@ -1414,8 +1414,7 @@
(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)))))
=== modified file 'lisp/calculator.el'
--- a/lisp/calculator.el 2011-05-23 17:57:17 +0000
+++ b/lisp/calculator.el 2011-10-30 01:56:03 +0000
@@ -720,7 +720,7 @@
;; 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)
=== modified file 'lisp/calendar/calendar.el'
--- a/lisp/calendar/calendar.el 2011-06-12 07:46:56 +0000
+++ b/lisp/calendar/calendar.el 2011-10-30 01:56:03 +0000
@@ -1330,12 +1330,12 @@
;; 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)
=== modified file 'lisp/dired-x.el'
--- a/lisp/dired-x.el 2011-10-19 12:54:24 +0000
+++ b/lisp/dired-x.el 2011-10-30 01:56:03 +0000
@@ -1259,7 +1259,7 @@
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))
=== modified file 'lisp/dired.el'
--- a/lisp/dired.el 2011-10-19 12:54:24 +0000
+++ b/lisp/dired.el 2011-10-30 01:56:03 +0000
@@ -2879,7 +2879,7 @@
(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 @@
;;;***
;;;### (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" "\
=== modified file 'lisp/emulation/crisp.el'
--- a/lisp/emulation/crisp.el 2011-10-20 00:26:14 +0000
+++ b/lisp/emulation/crisp.el 2011-10-30 01:56:03 +0000
@@ -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)
=== modified file 'lisp/emulation/edt.el'
--- a/lisp/emulation/edt.el 2011-01-26 08:36:39 +0000
+++ b/lisp/emulation/edt.el 2011-10-30 01:56:03 +0000
@@ -2362,7 +2362,7 @@
(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)
=== modified file 'lisp/emulation/tpu-edt.el'
--- a/lisp/emulation/tpu-edt.el 2011-05-23 17:57:17 +0000
+++ b/lisp/emulation/tpu-edt.el 2011-10-30 01:56:03 +0000
@@ -459,7 +459,7 @@
;; (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 @@
(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]
=== modified file 'lisp/emulation/vip.el'
--- a/lisp/emulation/vip.el 2011-02-10 16:56:00 +0000
+++ b/lisp/emulation/vip.el 2011-10-30 01:56:03 +0000
@@ -1605,7 +1605,7 @@
"Show current buffer in two windows."
(interactive)
(delete-other-windows)
- (split-window-vertically nil))
+ (split-window-below))
;; searching
=== modified file 'lisp/emulation/ws-mode.el'
--- a/lisp/emulation/ws-mode.el 2011-10-01 20:32:01 +0000
+++ b/lisp/emulation/ws-mode.el 2011-10-30 01:56:03 +0000
@@ -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 @@
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
=== modified file 'lisp/follow.el'
--- a/lisp/follow.el 2011-10-19 12:54:24 +0000
+++ b/lisp/follow.el 2011-10-30 01:56:03 +0000
@@ -509,7 +509,7 @@
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 @@
(< (prefix-numeric-value arg) 0))))
(start (window-start)))
(delete-other-windows)
- (split-window-horizontally)
+ (split-window-right)
(if other
(progn
(other-window 1)
=== modified file 'lisp/image-dired.el'
--- a/lisp/image-dired.el 2011-08-08 18:21:32 +0000
+++ b/lisp/image-dired.el 2011-10-30 01:56:03 +0000
@@ -782,13 +782,12 @@
(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)))))
=== modified file 'lisp/isearch.el'
--- a/lisp/isearch.el 2011-10-24 05:56:04 +0000
+++ b/lisp/isearch.el 2011-10-30 01:56:03 +0000
@@ -1804,9 +1804,13 @@
;; 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)
=== modified file 'lisp/menu-bar.el'
--- a/lisp/menu-bar.el 2011-10-19 12:54:24 +0000
+++ b/lisp/menu-bar.el 2011-10-30 01:56:03 +0000
@@ -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")))
=== modified file 'lisp/net/newst-treeview.el'
--- a/lisp/net/newst-treeview.el 2011-05-13 19:06:36 +0000
+++ b/lisp/net/newst-treeview.el 2011-10-30 01:56:03 +0000
@@ -2018,10 +2018,10 @@
(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)
=== modified file 'lisp/progmodes/ada-xref.el'
--- a/lisp/progmodes/ada-xref.el 2011-04-22 18:44:26 +0000
+++ b/lisp/progmodes/ada-xref.el 2011-10-30 01:56:03 +0000
@@ -1438,7 +1438,7 @@
;; 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)
)))
=== modified file 'lisp/progmodes/fortran.el'
--- a/lisp/progmodes/fortran.el 2011-06-12 00:57:24 +0000
+++ b/lisp/progmodes/fortran.el 2011-10-30 01:56:03 +0000
@@ -1097,7 +1097,7 @@
(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))))
=== modified file 'lisp/progmodes/gdb-mi.el'
--- a/lisp/progmodes/gdb-mi.el 2011-10-28 02:22:38 +0000
+++ b/lisp/progmodes/gdb-mi.el 2011-10-30 01:56:03 +0000
@@ -4028,7 +4028,7 @@
(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 @@
;; 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))
=== modified file 'lisp/talk.el'
--- a/lisp/talk.el 2011-04-19 13:44:55 +0000
+++ b/lisp/talk.el 2011-10-30 01:56:03 +0000
@@ -111,7 +111,7 @@
(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))))
=== modified file 'lisp/textmodes/reftex-toc.el'
--- a/lisp/textmodes/reftex-toc.el 2011-01-25 04:08:28 +0000
+++ b/lisp/textmodes/reftex-toc.el 2011-10-30 01:56:03 +0000
@@ -247,10 +247,10 @@
(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)))))
=== modified file 'lisp/textmodes/two-column.el'
--- a/lisp/textmodes/two-column.el 2011-01-25 04:08:28 +0000
+++ b/lisp/textmodes/two-column.el 2011-10-30 01:56:03 +0000
@@ -333,7 +333,7 @@
;; 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)
=== modified file 'lisp/tutorial.el'
--- a/lisp/tutorial.el 2011-08-20 22:53:00 +0000
+++ b/lisp/tutorial.el 2011-10-30 01:56:03 +0000
@@ -298,7 +298,7 @@
(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])
=== modified file 'lisp/vc/emerge.el'
--- a/lisp/vc/emerge.el 2011-03-19 18:49:31 +0000
+++ b/lisp/vc/emerge.el 2011-10-30 01:56:03 +0000
@@ -1354,8 +1354,8 @@
(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 @@
(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*"
=== modified file 'lisp/vc/pcvs-util.el'
--- a/lisp/vc/pcvs-util.el 2011-01-25 04:08:28 +0000
+++ b/lisp/vc/pcvs-util.el 2011-10-30 01:56:03 +0000
@@ -88,7 +88,7 @@
(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)))))
=== modified file 'lisp/window.el'
--- a/lisp/window.el 2011-10-21 09:15:32 +0000
+++ b/lisp/window.el 2011-10-30 01:56:03 +0000
@@ -3262,39 +3262,28 @@
;; 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.
-
-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.
-
-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."
+(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 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.
+
+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 @@
(set-window-parameter new-window 'quit-restore quit-restore)))
new-window))
-(defalias 'split-window-vertically 'split-window-above-each-other)
-
-(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.
-
-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."
+(defalias 'split-window-vertically 'split-window-below)
+
+(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.
+
+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 @@
(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 @@
(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 @@
(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 @@
;; 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106241: Rename split-window-{above-each-other|split-window-side-by-side},
Chong Yidong <=