Function: window--even-window-sizes
window--even-window-sizes is a byte-compiled function defined in
window.el.gz.
Signature
(window--even-window-sizes WINDOW)
Documentation
Even sizes of WINDOW and selected window.
Even only if these windows are the only children of their parent,
even-window-sizes has the appropriate value and the selected
window is larger than WINDOW.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window--even-window-sizes (window)
"Even sizes of WINDOW and selected window.
Even only if these windows are the only children of their parent,
`even-window-sizes' has the appropriate value and the selected
window is larger than WINDOW."
(when (and (= (window-child-count (window-parent window)) 2)
(eq (window-parent) (window-parent window)))
(cond
((and (not (memq even-window-sizes '(nil height-only)))
(window-combined-p window t)
(> (window-total-width) (window-total-width window)))
(condition-case nil
(enlarge-window
(/ (- (window-total-width window) (window-total-width)) 2) t)
(error nil)))
((and (not (memq even-window-sizes '(nil width-only)))
(window-combined-p window)
(> (window-total-height) (window-total-height window)))
(condition-case nil
(enlarge-window
(/ (- (window-total-height window) (window-total-height)) 2))
(error nil))))))