Function: allout-chart-to-reveal

allout-chart-to-reveal is a byte-compiled function defined in allout.el.gz.

Signature

(allout-chart-to-reveal CHART DEPTH)

Documentation

Return a flat list of hidden points in subtree CHART, up to DEPTH.

If DEPTH is nil, include hidden points at any depth.

Note that point can be left at any of the points on chart, or at the start point.

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_   > allout-chart-to-reveal (chart depth)
(defun allout-chart-to-reveal (chart depth)

  "Return a flat list of hidden points in subtree CHART, up to DEPTH.

If DEPTH is nil, include hidden points at any depth.

Note that point can be left at any of the points on chart, or at the
start point."

  (let (result here)
    (while (and (or (null depth) (> depth 0))
		chart)
      (setq here (car chart))
      (if (listp here)
	  (let ((further (allout-chart-to-reveal here (if (null depth)
                                                          depth
                                                        (1- depth)))))
	    ;; We're on the start of a subtree -- recurse with it, if there's
	    ;; more depth to go:
	    (if further (setq result (append further result)))
	    (setq chart (cdr chart)))
	(goto-char here)
        (if (allout-hidden-p)
	    (setq result (cons here result)))
	(setq chart (cdr chart))))
    result))