Function: gametree-apply-layout

gametree-apply-layout is a byte-compiled function defined in gametree.el.gz.

Signature

(gametree-apply-layout LAYOUT DEPTH &optional FROM-TOP-LEVEL)

Source Code

;; Defined in /usr/src/emacs/lisp/play/gametree.el.gz
(defun gametree-apply-layout (layout depth &optional from-top-level)
  (let ((first-time t))
    (while (and layout
                (save-excursion
                  (ignore-errors
                    (or (and first-time from-top-level
                             (bolp) (looking-at outline-regexp))
                        (setq first-time nil)
                        (outline-next-visible-heading 1))
                    (< depth (gametree-current-branch-depth)))))
      (if (not first-time)
          (outline-next-visible-heading 1))
      (setq first-time nil)
      (outline-hide-subtree)
      (if (nth 0 layout)
          (funcall (nth 0 layout)))
      (if (not (and (nth 1 layout) (listp (nth 1 layout))))
          (setq layout (cdr layout))
        (gametree-apply-layout (nth 1 layout)
                               (gametree-current-branch-depth))
        (setq layout (cdr (cdr layout)))))))