diff options
author | Miles Bader <miles@gnu.org> | 2000-10-21 05:40:19 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2000-10-21 05:40:19 +0000 |
commit | d9c30bdf7f12f3201c767e1f6890fb6bf1c480e6 (patch) | |
tree | 70feaf02bd6b5cce1fc2607c93d5ed5b4a9d9478 /lisp/help.el | |
parent | 65e742bdea8d2f54ee7bdf49922912302d3fb5ef (diff) | |
download | emacs-d9c30bdf7f12f3201c767e1f6890fb6bf1c480e6.tar.gz |
(resize-temp-buffer-window): Use `fit-window-to-buffer'.
Diffstat (limited to 'lisp/help.el')
-rw-r--r-- | lisp/help.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/help.el b/lisp/help.el index adbe12e6ae9..aa3e7c42e32 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1463,13 +1463,11 @@ out of view." (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 |