Function: treemacs-with-button-buffer
treemacs-with-button-buffer is a macro defined in treemacs-macros.el.
Signature
(treemacs-with-button-buffer BTN &rest BODY)
Documentation
Use BTN's buffer to execute BODY.
Required for button interactions (like treemacs-button-get) that do not work
when called from another buffer than the one the button resides in and
treemacs-safe-button-get is not enough.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-macros.el
(defmacro treemacs-with-button-buffer (btn &rest body)
"Use BTN's buffer to execute BODY.
Required for button interactions (like `treemacs-button-get') that do not work
when called from another buffer than the one the button resides in and
`treemacs-safe-button-get' is not enough."
(declare (indent 1)
(debug (form body)))
`(with-current-buffer (marker-buffer ,btn)
,@body))