Function: hierarchy--create-delayed-tree-widget

hierarchy--create-delayed-tree-widget is a byte-compiled function defined in hierarchy.el.gz.

Signature

(hierarchy--create-delayed-tree-widget ELEM LABELFN INDENT CHILDRENFN)

Documentation

Return a list of tree-widgets for the children generated.

ELEM is the element of the hierarchy passed from hierarchy-convert-to-tree-widget; it and the CHILDRENFN are used to generate the children of the element dynamically.

LABELFN is the same function passed to hierarchy-convert-to-tree-widget.

INDENT is the same function passed to hierarchy-convert-to-tree-widget.

CHILDRENFN is the function used to discover the children of ELEM.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/hierarchy.el.gz
(defun hierarchy--create-delayed-tree-widget (elem labelfn indent childrenfn)
  "Return a list of tree-widgets for the children generated.

ELEM is the element of the hierarchy passed from
`hierarchy-convert-to-tree-widget'; it and the CHILDRENFN are used to generate
the children of the element dynamically.

LABELFN is the same function passed to `hierarchy-convert-to-tree-widget'.

INDENT is the same function passed to `hierarchy-convert-to-tree-widget'.

CHILDRENFN is the function used to discover the children of ELEM."
  (lambda (_widget)
    (mapcar
     (lambda (item)
       (widget-convert
        'tree-widget
        :tag (hierarchy-labelfn-to-string labelfn item indent)
        :expander (hierarchy--create-delayed-tree-widget
                   item
                   labelfn
                   (1+ indent)
                   childrenfn)))
     (funcall childrenfn elem))))