Variable: temp-buffer-resize-mode-hook
temp-buffer-resize-mode-hook is a customizable variable defined in
help.el.gz.
Value
nil
Documentation
Hook run after entering or leaving temp-buffer-resize-mode(var)/temp-buffer-resize-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/help.el.gz
(define-minor-mode temp-buffer-resize-mode
"Toggle auto-resizing temporary buffer windows (Temp Buffer Resize Mode).
When Temp Buffer Resize mode is enabled, the windows in which we
show a temporary buffer are automatically resized in height to
fit the buffer's contents, but never more than
`temp-buffer-max-height' nor less than `window-min-height'.
A window is resized only if it has been specially created for the
buffer. Windows that have shown another buffer before are not
resized. A frame is resized only if `fit-frame-to-buffer' is
non-nil.
This mode is used by `help', `apropos' and `completion' buffers,
and some others."
:global t :group 'help
(if temp-buffer-resize-mode
;; `help-make-xrefs' may add a `back' button and thus increase the
;; text size, so `resize-temp-buffer-window' must be run *after* it.
(add-hook 'temp-buffer-show-hook #'resize-temp-buffer-window 'append)
(remove-hook 'temp-buffer-show-hook #'resize-temp-buffer-window)))