Function: gametree-current-layout

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

Signature

(gametree-current-layout DEPTH &optional FROM-TOP-LEVEL)

Source Code

;; Defined in /usr/src/emacs/lisp/play/gametree.el.gz
(defun gametree-current-layout (depth &optional from-top-level)
  (let ((layout nil) (first-time t))
    (while (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)
      (if (not (gametree-children-shown-p))
          (setq layout
                (nconc layout
                       (if (gametree-entry-shown-p)
                           (list 'show-entry)
                         (list nil))))
        (setq layout (nconc layout (if (gametree-entry-shown-p)
                                       (list 'gametree-show-children-and-entry)
                                     (list 'show-children))))
        (let ((sub-layout
               (gametree-current-layout (gametree-current-branch-depth))))
          (setq layout (nconc layout (list sub-layout))))))
    layout))