Function: projectile-kill-buffers
projectile-kill-buffers is an autoloaded, interactive and
byte-compiled function defined in projectile.el.
Signature
(projectile-kill-buffers)
Documentation
Kill project buffers.
The buffers are killed according to the value of
projectile-kill-buffers-filter.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
;;;###autoload
(defun projectile-kill-buffers ()
"Kill project buffers.
The buffers are killed according to the value of
`projectile-kill-buffers-filter'."
(interactive)
(let* ((project (projectile-acquire-root))
(project-name (projectile-project-name project))
(buffers (projectile-project-buffers project)))
(when (yes-or-no-p
(format "Are you sure you want to kill %s buffers for '%s'? "
(length buffers) project-name))
(dolist (buffer buffers)
(when (and
;; we take care not to kill indirect buffers directly
;; as we might encounter them after their base buffers are killed
(not (buffer-base-buffer buffer))
(if (functionp projectile-kill-buffers-filter)
(funcall projectile-kill-buffers-filter buffer)
(pcase projectile-kill-buffers-filter
('kill-all t)
('kill-only-files (buffer-file-name buffer))
(_ (user-error "Invalid projectile-kill-buffers-filter value: %S" projectile-kill-buffers-filter)))))
(kill-buffer buffer))))))