# HG changeset patch # User Miles Bader # Date 972188417 0 # Node ID 29a87f28cd51d1d21fa5138bfedfb4b6edf9e792 # Parent 2f62b75a643d4a0051d44a64f3c9e55de9a2afb2 (fit-window-to-buffer): Change defaulting of MAX-HEIGHT slightly. diff -r 2f62b75a643d -r 29a87f28cd51 lisp/window.el --- a/lisp/window.el Sun Oct 22 04:18:14 2000 +0000 +++ b/lisp/window.el Sun Oct 22 04:20:17 2000 +0000 @@ -442,6 +442,8 @@ (when (null window) (setq window (selected-window))) + (when (null max-height) + (setq max-height (frame-height (window-frame window)))) (let* ((window-height ;; The current height of WINDOW @@ -458,11 +460,7 @@ (delta ;; Calculate how much the window height has to change to show ;; text-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. - (- (max (min (+ text-height extra) - (or max-height - (frame-height - (window-frame - (or window (selected-window)))))) + (- (max (min (+ text-height extra) max-height) (or min-height window-min-height)) window-height)) ;; We do our own height checking, so avoid any restrictions due to