projects
/
chise
/
xemacs-chise.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformatted.
[chise/xemacs-chise.git]
/
lisp
/
window-xemacs.el
diff --git
a/lisp/window-xemacs.el
b/lisp/window-xemacs.el
index
4950427
..
502c6dc
100644
(file)
--- a/
lisp/window-xemacs.el
+++ b/
lisp/window-xemacs.el
@@
-385,7
+385,7
@@
Returns the window displaying BUFFER."
;; and does `returns' all over the place and there's no sense
;; in trying to rewrite it to be more Lispy.
(catch 'done
;; and does `returns' all over the place and there's no sense
;; in trying to rewrite it to be more Lispy.
(catch 'done
- (let (window old-frame target-frame explicit-frame)
+ (let (window old-frame target-frame explicit-frame shrink-it)
(setq old-frame (or (last-nonminibuf-frame) (selected-frame)))
(setq buffer (get-buffer buffer))
(check-argument-type 'bufferp buffer)
(setq old-frame (or (last-nonminibuf-frame) (selected-frame)))
(setq buffer (get-buffer buffer))
(check-argument-type 'bufferp buffer)
@@
-573,9
+573,7
@@
Returns the window displaying BUFFER."
(and (window-leftmost-p window)
(window-rightmost-p window))))
(setq window (split-window window))
(and (window-leftmost-p window)
(window-rightmost-p window))))
(setq window (split-window window))
- (let (upper
-;; lower
- other)
+ (let (upper other)
(setq window (get-lru-window target-frame))
;; If the LRU window is selected, and big enough,
;; and can be split, split it.
(setq window (get-lru-window target-frame))
;; If the LRU window is selected, and big enough,
;; and can be split, split it.
@@
-605,11
+603,9
@@
Returns the window displaying BUFFER."
;; even out their heights.
(if (window-previous-child window)
(setq other (window-previous-child window)
;; even out their heights.
(if (window-previous-child window)
(setq other (window-previous-child window)
-;; lower window
upper other))
(if (window-next-child window)
(setq other (window-next-child window)
upper other))
(if (window-next-child window)
(setq other (window-next-child window)
-;; lower other
upper window))
;; Check that OTHER and WINDOW are vertically arrayed.
(if (and other
upper window))
;; Check that OTHER and WINDOW are vertically arrayed.
(if (and other
@@
-622,8
+618,11
@@
Returns the window displaying BUFFER."
2)
(window-height upper))
nil upper))
2)
(window-height upper))
nil upper))
- (if shrink-to-fit
- (shrink-window-if-larger-than-buffer window)))))
+ ;; Klaus Berndl <klaus.berndl@sdm.de>: Only in
+ ;; this situation we shrink-to-fit but we can do
+ ;; this first after we have displayed buffer in
+ ;; window (s.b. (set-window-buffer window buffer))
+ (setq shrink-it shrink-to-fit))))
(setq window (get-lru-window target-frame)))
(setq window (get-lru-window target-frame)))
@@
-636,6
+635,12
@@
Returns the window displaying BUFFER."
(set-window-buffer window buffer)
(set-window-buffer window buffer)
+ ;; Now window's previous buffer has been brought to the top
+ ;; of the MRU chain and window displays buffer - now we can
+ ;; shrink-to-fit if necessary
+ (if shrink-it
+ (shrink-window-if-larger-than-buffer window))
+
(display-buffer-1 window)))))
(or (equal wconfig (current-window-configuration))
(push-window-configuration wconfig))
(display-buffer-1 window)))))
(or (equal wconfig (current-window-configuration))
(push-window-configuration wconfig))