Function: org-fit-window-to-buffer
org-fit-window-to-buffer is a byte-compiled function defined in
org-macs.el.
Signature
(org-fit-window-to-buffer &optional WINDOW MAX-HEIGHT MIN-HEIGHT SHRINK-ONLY)
Documentation
Fit WINDOW to the buffer, but only if it is not a side-by-side window.
WINDOW defaults to the selected window. MAX-HEIGHT and MIN-HEIGHT are
passed through to fit-window-to-buffer. If SHRINK-ONLY is set, call
shrink-window-if-larger-than-buffer instead, the height limit is
ignored in this case.
Source Code
;; Defined in ~/.emacs.d/elpa/org-9.8.2/org-macs.el
(defun org-fit-window-to-buffer (&optional window max-height min-height
shrink-only)
"Fit WINDOW to the buffer, but only if it is not a side-by-side window.
WINDOW defaults to the selected window. MAX-HEIGHT and MIN-HEIGHT are
passed through to `fit-window-to-buffer'. If SHRINK-ONLY is set, call
`shrink-window-if-larger-than-buffer' instead, the height limit is
ignored in this case."
(cond ((not (window-full-width-p window))
;; Do nothing if another window would suffer.
)
((not shrink-only)
(fit-window-to-buffer window max-height min-height))
(t (shrink-window-if-larger-than-buffer window)))
(or window (selected-window)))