Function: treemacs-collapse-parent-node

treemacs-collapse-parent-node is an interactive and byte-compiled function defined in treemacs-interface.el.

Signature

(treemacs-collapse-parent-node ARG)

Documentation

Close the parent of the node at point.

Prefix ARG will be passed on to the closing function
(see treemacs-toggle-node.)

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-interface.el
(defun treemacs-collapse-parent-node (arg)
  "Close the parent of the node at point.
Prefix ARG will be passed on to the closing function
\(see `treemacs-toggle-node'.\)"
  (interactive "P")
  (-if-let* ((btn (treemacs-current-button))
             (parent (button-get btn :parent)))
      (progn
        (goto-char parent)
        (treemacs-toggle-node arg)
        (treemacs--evade-image))
    (treemacs-pulse-on-failure
        (if btn "Already at root." "There is nothing to close here."))))