Function: projectile--unwatch-project
projectile--unwatch-project is a byte-compiled function defined in
projectile.el.
Signature
(projectile--unwatch-project PROJECT)
Documentation
Remove all file-notify watches registered for PROJECT.
Queued events and the pending debounce timer are discarded too.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--unwatch-project (project)
"Remove all file-notify watches registered for PROJECT.
Queued events and the pending debounce timer are discarded too."
(dolist (entry (gethash project projectile--project-watches))
(ignore-errors (file-notify-rm-watch (car entry))))
;; Unconditional: a nil registry value (no watches left) must still be
;; removed, or it would survive `projectile--teardown-all-watches'.
(remhash project projectile--project-watches)
(when-let* ((timer (gethash project projectile--watch-debounce-timers)))
(cancel-timer timer)
(remhash project projectile--watch-debounce-timers))
(remhash project projectile--watch-pending-events))