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.

Implementations

((project (head projectile))) in `projectile.el'.

Undocumented

((project (head vc))) in `project.el'.

Undocumented

(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."
  (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)))