Variable: temp-buffer-resize-mode
temp-buffer-resize-mode is a customizable variable defined in
help.el.gz.
Value
nil
Documentation
Non-nil if Temp-Buffer-Resize mode is enabled.
See the temp-buffer-resize-mode(var)/temp-buffer-resize-mode(fun) command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node (emacs)Easy Customization)
or call the function temp-buffer-resize-mode(var)/temp-buffer-resize-mode(fun).
Probably introduced at or before Emacs version 20.4.
Key Bindings
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)))