[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Shrinking side-by-side windows
From: |
Matthew Mundell |
Subject: |
Shrinking side-by-side windows |
Date: |
07 Feb 2004 15:21:28 +0000 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
With the CVS Emacs, shrink-window-if-larger-than-buffer (C-x -)
shrinks a window when there is a window to its right and a single
window across the frame above it (or across the bottom of the frame if
it is the top-left window).
It seems that for a non-top-left window window-safely-shrinkable-p
only checks the previous window. And when called without an argument
(as by shrink-window-if-larger-than-buffer) window-safely-shrinkable-p
treats the top-left window as any other window (checking the previous
window instead of only the next). This could be changed follows.
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/window.el,v
retrieving revision 1.92
diff -u -r1.92 window.el
--- window.el 24 Sep 2003 22:55:42 -0000 1.92
+++ window.el 5 Feb 2004 19:51:43 -0000
@@ -189,10 +189,14 @@
"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))
+ (if window
+ (select-window window)
+ (setq window (selected-window)))
(or (and (not (eq window (frame-first-window)))
(= (car (window-edges))
- (car (window-edges (previous-window)))))
+ (car (window-edges (previous-window))))
+ (= (car (window-edges))
+ (car (window-edges (next-window)))))
(= (car (window-edges))
(car (window-edges (next-window)))))))
- Shrinking side-by-side windows,
Matthew Mundell <=