Function: window--sides-check-failed
window--sides-check-failed is a byte-compiled function defined in
window.el.gz.
Signature
(window--sides-check-failed FRAME)
Documentation
Helper function for window--sides-check.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window--sides-check-failed (frame)
"Helper function for `window--sides-check'."
(catch 'failed
;; FRAME must have a main window.
(unless (window-main-window frame)
(error "Frame %s has no main window" frame)
(throw 'failed t))
;; Now check the side windows.
(dolist (side '(left top right bottom))
(let ((window (window-with-parameter 'window-side side frame t)))
(when window
;; If WINDOW is live there must be no other window on this frame
;; with the same `window-side' parameter.
(if (window-live-p window)
(walk-window-tree
(lambda (this)
(when (and (eq (window-parameter this 'window-side) side)
(not (eq this window)))
(error "Window %s has same side %s as window %s but no common parent"
this side window)
(throw 'failed t)))
frame t 'nomini)
(walk-window-tree
(lambda (this)
(if (eq (window-parent this) window)
(unless (eq (window-parameter this 'window-side) side)
(error "Window %s has not same side %s as its parent %s"
this side window)
(throw 'failed t))
(when (and (eq (window-parameter this 'window-side) side)
(not (eq this window)))
(error "Window %s has same side %s as major side window %s but its parent is %s"
this side window (window-parent this))
(throw 'failed t))))
frame t 'nomini)))))))