diff options
author | Stefan Monnier <[email protected]> | 2004-02-09 00:56:25 +0000 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2004-02-09 00:56:25 +0000 |
commit | fc4d69e139ccee1151c17f5f6b7f5b054c8bc8f5 (patch) | |
tree | 111c35c2c52d2a1e77e0805013afc56df9200e71 /lisp/window.el | |
parent | 7fefaee7c97267ec0879ebc6102579ca2b378c94 (diff) |
(window-safely-shrinkable-p): Don't change the buffer-list.
Don't allow shrink if there's a window on our right.
Diffstat (limited to 'lisp/window.el')
-rw-r--r-- | lisp/window.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/window.el b/lisp/window.el index c4ae59e148..91b91cfb15 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1,6 +1,6 @@ ;;; window.el --- GNU Emacs window commands aside from those written in C -;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002 +;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -188,13 +188,11 @@ even if it is inactive." (defun window-safely-shrinkable-p (&optional window) "Non-nil if the WINDOW can be shrunk without shrinking other windows. If WINDOW is nil or omitted, it defaults to the currently selected window." - (save-selected-window - (when window (select-window window)) - (or (and (not (eq window (frame-first-window))) - (= (car (window-edges)) - (car (window-edges (previous-window))))) - (= (car (window-edges)) - (car (window-edges (next-window))))))) + (with-selected-window (or window (selected-window)) + (let ((edges (window-edges))) + (or (= (nth 2 edges) (nth 2 (window-edges (previous-window)))) + (= (nth 0 edges) (nth 0 (window-edges (next-window)))))))) + (defun balance-windows () "Make all visible windows the same height (approximately)." |