1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

project-buffers: Describe the default implementation

* lisp/progmodes/project.el (project-buffers):
Describe what the default implementation is doing (bug#58784).
This commit is contained in:
Dmitry Gutov 2022-11-04 03:16:36 +02:00
parent ef45bfacb2
commit 7d47651d01

View file

@ -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))