aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2000-10-21 05:40:19 +0000
committerMiles Bader <[email protected]>2000-10-21 05:40:19 +0000
commitd9c30bdf7f12f3201c767e1f6890fb6bf1c480e6 (patch)
tree70feaf02bd6b5cce1fc2607c93d5ed5b4a9d9478 /lisp
parent65e742bdea8d2f54ee7bdf49922912302d3fb5ef (diff)
(resize-temp-buffer-window): Use `fit-window-to-buffer'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/help.el12
2 files changed, 9 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 619bffa8db..42eebf899f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
2000-10-21 Miles Bader <[email protected]>
+ * window.el (fit-window-to-buffer): New function.
+ (shrink-window-if-larger-than-buffer): Use it.
+ * help.el (resize-temp-buffer-window): Use `fit-window-to-buffer'.
+
* international/quail.el (quail-show-guidance-buf): Make sure
guidance window really has enough room.
(quail-update-guidance): If quail-guidance-win is already shown,
diff --git a/lisp/help.el b/lisp/help.el
index adbe12e6ae..aa3e7c42e3 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