From cad0490b013ebcad4711b36e37a3bc198d8f9d1e Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 8 Nov 2015 14:46:22 +0200 Subject: [PATCH] Remove dirs in vc project roots from the the vc project library roots * lisp/progmodes/project.el (project-library-roots): Remove directories inside the project roots from the result. (http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00536.html) --- lisp/progmodes/project.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index d177779b2d0..9cdeb392f09 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -140,12 +140,15 @@ The file names can be absolute, or relative to the project root." (list (cdr project))) (cl-defmethod project-library-roots ((project (head vc))) - (append - (let ((root (cdr project))) - (mapcar - (lambda (dir) (file-name-as-directory (expand-file-name dir root))) - (project--value-in-dir 'project-vc-library-roots root))) - (cl-call-next-method))) + (project-subtract-directories + (project-combine-directories + (append + (let ((root (cdr project))) + (mapcar + (lambda (dir) (file-name-as-directory (expand-file-name dir root))) + (project--value-in-dir 'project-vc-library-roots root))) + (funcall project-library-roots-function))) + (project-roots project))) (cl-defmethod project-ignores ((project (head vc)) dir) (let* ((root (cdr project)) -- 2.39.5