From: Martin Rudalics Date: Wed, 22 Jun 2011 09:23:31 +0000 (+0200) Subject: Normalize SIDE argument of split-window (Bug#8916). X-Git-Tag: emacs-pretest-24.0.90~104^2~476 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=130e3e112121f9f27514ddd4fee6d11fb0fed0b3;p=emacs.git Normalize SIDE argument of split-window (Bug#8916). * window.el (split-window): Normalize SIDE argument (Bug#8916). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e5c2e2ad628..0c72fbf47db 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,7 @@ * window.el (display-buffer-default-specifiers) (display-buffer-alist): Remove entries for pop-up-frame-alist. Suggested by Katsumi Yamaoka . + (split-window): Normalize SIDE argument (Bug#8916). * frame.el (pop-up-frame-alist, pop-up-frame-function) (special-display-frame-alist, special-display-popup-frame): diff --git a/lisp/window.el b/lisp/window.el index 1c347c70067..ac43fe7703c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -3014,7 +3014,11 @@ new window are inherited from the window selected on WINDOW's frame. The selected window is not changed by this function." (interactive "i") (setq window (normalize-any-window window)) - (let* ((horizontal (not (memq side '(nil below above)))) + (let* ((side (cond + ((not side) 'below) + ((memq side '(below above right left)) side) + (t 'right))) + (horizontal (not (memq side '(nil below above)))) (frame (window-frame window)) (parent (window-parent window)) (function (window-parameter window 'split-window))