Function: treemacs-with-toggle
treemacs-with-toggle is a macro defined in treemacs-macros.el.
Signature
(treemacs-with-toggle &rest BODY)
Documentation
Building block helper macro.
If treemacs is currently visible it will be hidden, if it is not visible, or no treemacs buffer exists at all, BODY will be executed.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-macros.el
(defmacro treemacs-with-toggle (&rest body)
"Building block helper macro.
If treemacs is currently visible it will be hidden, if it is not visible, or no
treemacs buffer exists at all, BODY will be executed."
`(--if-let (treemacs-get-local-window)
(delete-window it)
,@body))