Function: treemacs--without-filewatch

treemacs--without-filewatch is a macro defined in treemacs-macros.el.

Signature

(treemacs--without-filewatch &rest BODY)

Documentation

Run BODY without triggering the filewatch callback.

Required for manual interactions with the file system (like deletion), otherwise the on-delete code will run twice.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-macros.el
;; TODO(2021/08/28): RM
(defmacro treemacs--without-filewatch (&rest body)
  "Run BODY without triggering the filewatch callback.
Required for manual interactions with the file system (like deletion), otherwise
the on-delete code will run twice."
  (declare (debug t))
  `(cl-flet (((symbol-function 'treemacs--filewatch-callback) (symbol-function 'ignore)))
     ,@body))