# HG changeset patch # User Miles Bader # Date 972106735 0 # Node ID 605eabd04a57d5df8e6b742647d2960e805fa56a # Parent 7d93bad806558e6a7e2fa7f2aa0f3239d04eedfc (resize-temp-buffer-window): Use `fit-window-to-buffer'. diff -r 7d93bad80655 -r 605eabd04a57 lisp/help.el --- 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