From: Dmitry Gutov Date: Sun, 8 Nov 2015 12:46:22 +0000 (+0200) Subject: Remove dirs in vc project roots from the the vc project library roots X-Git-Tag: emacs-25.0.90~862^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cad0490b013ebcad4711b36e37a3bc198d8f9d1e;p=emacs.git 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) --- 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))