Function: window--subtree

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

Signature

(window--subtree WINDOW &optional NEXT)

Documentation

Return window subtree rooted at WINDOW.

Optional argument NEXT non-nil means include WINDOW's right siblings in the return value.

See the documentation of window-tree for a description of the return value.

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window--subtree (window &optional next)
  "Return window subtree rooted at WINDOW.
Optional argument NEXT non-nil means include WINDOW's right
siblings in the return value.

See the documentation of `window-tree' for a description of the
return value."
  (let (list)
    (while window
      (setq list
	    (cons
	     (cond
	      ((window-top-child window)
	       (cons t (cons (window-edges window)
			     (window--subtree (window-top-child window) t))))
	      ((window-left-child window)
	       (cons nil (cons (window-edges window)
			       (window--subtree (window-left-child window) t))))
	      (t window))
	     list))
      (setq window (when next (window-next-sibling window))))
    (nreverse list)))