Function: tree-widget-action
tree-widget-action is a byte-compiled function defined in
tree-widget.el.gz.
Signature
(tree-widget-action TREE &optional EVENT)
Documentation
Handle the :action of the TREE tree-widget.
That is, toggle expansion of the TREE tree-widget. Ignore the EVENT argument.
Source Code
;; Defined in /usr/src/emacs/lisp/tree-widget.el.gz
(defun tree-widget-action (tree &optional _event)
"Handle the :action of the TREE tree-widget.
That is, toggle expansion of the TREE tree-widget.
Ignore the EVENT argument."
(let ((open (not (widget-get tree :open))))
(or open
;; Before to collapse the node, save children values so next
;; open can recover them.
(tree-widget-children-value-save tree))
(widget-put tree :open open)
(widget-value-set tree open)
(run-hook-with-args 'tree-widget-after-toggle-functions tree)))