From dd8254f66842f085ddc23eb8c1870147a15054d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A4r=20Bohrarper?= Date: Fri, 14 Jun 2024 04:04:20 +0300 Subject: [PATCH] Fix file listing in submodules with project-files-relative-names=t * lisp/progmodes/project.el (project--vc-list-files): Prepend module names to files when project-files-relative-names is non-nil (bug#71538). (cherry picked from commit 2dae603c4140a0a449b2ddaf572fe94de3908f31) --- lisp/progmodes/project.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index d73fac81280..e55b6be1fb3 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -709,10 +709,16 @@ See `project-vc-extra-root-markers' for the marker value format.") (mapcar (lambda (module) (when (file-directory-p module) - (project--vc-list-files - (concat default-directory module) - backend - extra-ignores))) + (let ((sub-files + (project--vc-list-files + (concat default-directory module) + backend + extra-ignores))) + (if project-files-relative-names + (mapcar (lambda (file) + (concat (file-name-as-directory module) file)) + sub-files) + sub-files)))) submodules))) (setq files (apply #'nconc files sub-files)))) -- 2.39.2