Function: allout-chart-exposure-contour-by-icon
allout-chart-exposure-contour-by-icon is a byte-compiled function
defined in allout-widgets.el.gz.
Signature
(allout-chart-exposure-contour-by-icon &optional FROM-DEPTH)
Documentation
Return points of subtree items to which exposure should be extended.
The qualifying items are ones with a widget icon that is in the closed or empty state, or items with undecorated subitems.
The resulting list of points is in reverse order.
Optional FROM-DEPTH is for internal use.
Source Code
;; Defined in /usr/src/emacs/lisp/allout-widgets.el.gz
;;;_ > allout-chart-exposure-contour-by-icon (&optional from-depth)
(defun allout-chart-exposure-contour-by-icon (&optional from-depth)
"Return points of subtree items to which exposure should be extended.
The qualifying items are ones with a widget icon that is in the closed or
empty state, or items with undecorated subitems.
The resulting list of points is in reverse order.
Optional FROM-DEPTH is for internal use."
;; During internal recursion, we return a pair: (at-end . result)
;; Otherwise we just return the result.
(let ((from-depth from-depth)
start-point
at-end level-depth
this-widget
got subgot)
(if from-depth
(setq level-depth (allout-depth))
;; at containing item:
(setq start-point (point))
(setq from-depth (allout-depth))
(setq at-end (not (allout-next-heading))
level-depth allout-recent-depth))
;; traverse the level, recursing on deeper levels:
(while (and (not at-end)
(> allout-recent-depth from-depth)
(setq this-widget (allout-get-item-widget)))
(if (< level-depth allout-recent-depth)
;; recurse:
(progn
(setq subgot (allout-chart-exposure-contour-by-icon level-depth)
at-end (car subgot)
subgot (cdr subgot))
(if subgot (setq got (append subgot got))))
;; progress at this level:
(when (memq (widget-get this-widget :icon-state) '(closed empty))
(push (point) got)
(allout-end-of-subtree))
(setq at-end (not (allout-next-heading)))))
;; tailor result depending on whether or not we're a recursion:
(if (not start-point)
(cons at-end got)
(goto-char start-point)
got)))