fix split-window command
authorShawn Betts <sabetts@gmail.com>
Tue, 4 Dec 2007 11:06:20 +0000 (4 03:06 -0800)
committerShawn Betts <sabetts@gmail.com>
Tue, 4 Dec 2007 11:06:20 +0000 (4 03:06 -0800)
src/lisp/simple.lisp
src/window.lisp

index 171ade6..9d34504 100644 (file)
@@ -657,17 +657,17 @@ of the accessible part of the buffer."
   (set-mark-command)
   (goto-char (point-min)))
 
-(defcommand split-window-vertically ()
-  (split-window (selected-window)))
+(defcommand split-window ()
+  (split-window-internal (selected-window)))
 
 (defcommand split-window-horizontally ()
-  (split-window (selected-window) nil t))
+  (split-window-internal (selected-window) nil t))
 
 (defcommand switch-to-buffer-other-window ((buffer)
                                           (:buffer "Switch to buffer in other window: " (buffer-name (other-buffer (current-buffer)))))
   (let* ((cw (selected-window))
         (w (or (next-window cw)
-               (split-window cw))))
+               (split-window-internal cw))))
     (select-window w)
     (switch-to-buffer buffer)))
 
index 627cd08..7987bea 100644 (file)
@@ -750,7 +750,7 @@ do not put this buffer at the front of the list of recently selected ones.
          window
          new)))
 
-(defun split-window (&optional (window (selected-window)) size horflag)
+(defun split-window-internal (&optional (window (selected-window)) size horflag)
   (when (typep window 'minibuffer-window)
     (error "Attempt to split minibuffer window"))
   (when (null size)
@@ -890,7 +890,7 @@ argument NOT-THIS-WINDOW is non-nil (interactively, with prefix arg).
                                            (eq (window-buffer w) buffer)))
                                     (frame-window-tree (selected-frame)))
                (next-window cw)
-               (split-window cw))))
+               (split-window-internal cw))))
     (set-window-buffer w buffer)
     (window-restore-point w)
     w))