emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] project-next cad0490: Remove dirs in vc project roots from


From: Dmitry Gutov
Subject: [Emacs-diffs] project-next cad0490: Remove dirs in vc project roots from the the vc project library roots
Date: Sun, 08 Nov 2015 12:46:27 +0000

branch: project-next
commit cad0490b013ebcad4711b36e37a3bc198d8f9d1e
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index d177779..9cdeb39 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]