Function: project-kill-buffers
project-kill-buffers is an autoloaded, interactive and byte-compiled
function defined in project.el.gz.
Signature
(project-kill-buffers &optional NO-CONFIRM)
Documentation
Kill the buffers belonging to the current project.
Two buffers belong to the same project if their project
instances, as reported by project-current in each buffer, are
identical. Only the buffers that match a condition in
project-kill-buffer-conditions will be killed. If NO-CONFIRM
is non-nil, the command will not ask the user for confirmation.
NO-CONFIRM is always nil when the command is invoked
interactively.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
;;;###autoload
(defun project-kill-buffers (&optional no-confirm)
"Kill the buffers belonging to the current project.
Two buffers belong to the same project if their project
instances, as reported by `project-current' in each buffer, are
identical. Only the buffers that match a condition in
`project-kill-buffer-conditions' will be killed. If NO-CONFIRM
is non-nil, the command will not ask the user for confirmation.
NO-CONFIRM is always nil when the command is invoked
interactively."
(interactive)
(let* ((pr (project-current t))
(bufs (project--buffers-to-kill pr)))
(cond (no-confirm
(mapc #'kill-buffer bufs))
((null bufs)
(message "No buffers to kill"))
((yes-or-no-p (format "Kill %d buffers in %s? "
(length bufs)
(project-root pr)))
(mapc #'kill-buffer bufs)))))