Function: treemacs-walk-dom

treemacs-walk-dom is a byte-compiled function defined in treemacs-dom.el.

Signature

(treemacs-walk-dom NODE FN)

Documentation

Recursively walk the dom starting at NODE.

Calls FN on every node encountered in a depth-first pattern, starting with the deepest. This assures that FN may destructively modify the dom, at least on levels the one currently visiting.

NODE: Dom Node Struct FN: (Dom Node) -> Any

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-dom.el
(defun treemacs-walk-dom (node fn)
  "Recursively walk the dom starting at NODE.
Calls FN on every node encountered in a depth-first pattern, starting with the
deepest.  This assures that FN may destructively modify the dom, at least on
levels the one currently visiting.

NODE: Dom Node Struct
FN: (Dom Node) -> Any"
  (declare (indent 1))
  (-let [children (treemacs-dom-node->children node)]
    (funcall fn node)
    (dolist (it children)
      (treemacs-walk-dom it fn))))