Skip to content

Commit

Permalink
project-buffers: Describe the default implementation
Browse files Browse the repository at this point in the history
* lisp/progmodes/project.el (project-buffers):
Describe what the default implementation is doing (bug#58784).
  • Loading branch information
dgutov committed Nov 4, 2022
1 parent ef45bfa commit 7d47651
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lisp/progmodes/project.el
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,10 @@ Also quote LOCAL-FILES if `default-directory' is quoted."
local-files))))

(cl-defgeneric project-buffers (project)
"Return the list of all live buffers that belong to PROJECT."
"Return the list of all live buffers that belong to PROJECT.
The default implementation matches the current open buffers to
PROJECT root using the value of `default-directory' in each one."
(let ((root (expand-file-name (file-name-as-directory (project-root project))))
bufs)
(dolist (buf (buffer-list))
Expand Down

0 comments on commit 7d47651

Please sign in to comment.