diff options
-rw-r--r-- | common.el | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -151,6 +151,22 @@ windows. And ALIST is completely ignored. \(fn BUFFER ALIST)")) +;;;###autoload +(defvar durand-window-max-height 0.3 + "Maximal height of the bottom window. +The window is placed at the bottom.") + +;;;###autoload +(defun durand-fit-window-to-buffer-with-max (window) + "Fit WINDOW to its buffer. +This is a thin wrapper around `fit-window-to-buffer'. It passes +the window to the function with max-height equal to +`durand-window-max-height'." + (fit-window-to-buffer window + (floor + (* durand-window-max-height + (frame-height (window-frame window)))))) + ;; (defun durand-display-in-one-window (buffer _alist) ;; "Display BUFFER in one window. ;; ALIST is an association list of action symbols and values. See |