changeset 32706:605eabd04a57

(resize-temp-buffer-window): Use `fit-window-to-buffer'.
author Miles Bader <miles@gnu.org>
date Sat, 21 Oct 2000 05:38:55 +0000
parents 7d93bad80655
children a7f553888671
files lisp/help.el
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Sat Oct 21 05:38:11 2000 +0000
+++ b/lisp/help.el	Sat Oct 21 05:38:55 2000 +0000
@@ -1463,13 +1463,11 @@
   (unless (or (one-window-p 'nomini)
               (not (pos-visible-in-window-p (point-min)))
               (/=  (frame-width) (window-width)))
-    (let* ((max-height (if (functionp temp-buffer-max-height)
-                           (funcall temp-buffer-max-height (current-buffer))
-                         temp-buffer-max-height))
-           (min-height (1- window-min-height))
-           (text-height (count-screen-lines))
-           (new-height (max (min text-height max-height) min-height)))
-      (set-window-text-height nil new-height))))
+    (fit-window-to-buffer
+     (selected-window)
+     (if (functionp temp-buffer-max-height)
+	 (funcall temp-buffer-max-height (current-buffer))
+       temp-buffer-max-height))))
 
 ;; `help-manyarg-func-alist' is defined primitively (in doc.c).
 ;; New primitives with `MANY' or `UNEVALLED' arglists should be added