Function: window-max-delta

window-max-delta is a byte-compiled function defined in window.el.gz.

Signature

(window-max-delta &optional WINDOW HORIZONTAL IGNORE TRAIL NOUP NODOWN PIXELWISE)

Documentation

Return maximum number of lines by which WINDOW can be enlarged.

WINDOW must be a valid window and defaults to the selected one. The return value is zero if WINDOW cannot be enlarged.

Optional argument HORIZONTAL non-nil means return maximum number of columns by which WINDOW can be enlarged.

The optional argument IGNORE has the same meaning as for window-resizable. Optional argument TRAIL restricts the windows that can be enlarged. If its value is before, only windows to the left of or above WINDOW can be enlarged. If it is after, only windows to the right of or below WINDOW can be enlarged.

Optional argument NOUP non-nil means don't go up in the window tree but try to obtain the entire space from windows within WINDOW's combination. Optional argument NODOWN non-nil means do not check whether WINDOW itself (and its child windows) can be enlarged; check only whether other windows can be shrunk appropriately.

Optional argument PIXELWISE non-nil means return number of pixels by which WINDOW can be enlarged.

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window-max-delta (&optional window horizontal ignore trail noup nodown pixelwise)
  "Return maximum number of lines by which WINDOW can be enlarged.
WINDOW must be a valid window and defaults to the selected one.
The return value is zero if WINDOW cannot be enlarged.

Optional argument HORIZONTAL non-nil means return maximum number
of columns by which WINDOW can be enlarged.

The optional argument IGNORE has the same meaning as for
`window-resizable'.  Optional argument TRAIL restricts the
windows that can be enlarged.  If its value is `before', only
windows to the left of or above WINDOW can be enlarged.  If it is
`after', only windows to the right of or below WINDOW can be
enlarged.

Optional argument NOUP non-nil means don't go up in the window
tree but try to obtain the entire space from windows within
WINDOW's combination.  Optional argument NODOWN non-nil means do
not check whether WINDOW itself (and its child windows) can be
enlarged; check only whether other windows can be shrunk
appropriately.

Optional argument PIXELWISE non-nil means return number of
pixels by which WINDOW can be enlarged."
  (setq window (window-normalize-window window))
  (if (and (not nodown) (window-size-fixed-p window horizontal ignore))
      ;; With IGNORE and NODOWN nil return zero if WINDOW has fixed
      ;; size.
      0
    ;; WINDOW has no fixed size.
    (window--max-delta-1 window 0 horizontal ignore trail noup pixelwise)))