Function: treesit-fold--with-selected-window

treesit-fold--with-selected-window is a macro defined in treesit-fold-util.el.

Signature

(treesit-fold--with-selected-window WINDOW &rest BODY)

Documentation

Same with with-selected-window but safe.

See macro with-selected-window description for arguments WINDOW and BODY.

Source Code

;; Defined in /nix/store/mpy1l6b4hlzpp59l4vbahq83hqa821ci-emacs-packages-deps/share/emacs/site-lisp/elpa/treesit-fold-0.2.1/treesit-fold-util.el
;;
;; (@* "Window" )
;;

(defmacro treesit-fold--with-selected-window (window &rest body)
  "Same with `with-selected-window' but safe.

See macro `with-selected-window' description for arguments WINDOW and BODY."
  (declare (indent 1) (debug t))
  `(when (window-live-p ,window) (with-selected-window ,window ,@body)))