Function: project-buffers
project-buffers is a byte-compiled function defined in project.el.gz.
Signature
(project-buffers PROJECT)
Documentation
Return the list of all live buffers that belong to PROJECT.
The default implementation matches each buffer to PROJECT root using
the buffer's value of default-directory.
Implementations
(project-buffers (PROJECT (head projectile))) in `projectile.el'.
Undocumented
(project-buffers (PROJECT (head vc))) in `project.el'.
Undocumented
(project-buffers PROJECT) in `project.el'.
Undocumented
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
(cl-defgeneric project-buffers (project)
"Return the list of all live buffers that belong to PROJECT.
The default implementation matches each buffer to PROJECT root using
the buffer's value of `default-directory'."
(let ((root (expand-file-name (file-name-as-directory (project-root project))))
bufs)
(dolist (buf (buffer-list))
(when (string-prefix-p root (expand-file-name
(buffer-local-value 'default-directory buf)))
(push buf bufs)))
(nreverse bufs)))