]> code.delx.au - gnu-emacs/commitdiff
Remove dirs in vc project roots from the the vc project library roots
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 8 Nov 2015 12:46:22 +0000 (14:46 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 8 Nov 2015 12:46:22 +0000 (14:46 +0200)
* 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

index d177779b2d0f5618d96e7b53f316dcc38be3b96c..9cdeb392f0986c2ac4c120490fc3b5bde809fd4b 100644 (file)
@@ -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))