summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2015-11-08 14:46:22 +0200
committerDmitry Gutov <dgutov@yandex.ru>2015-11-08 14:46:22 +0200
commitcad0490b013ebcad4711b36e37a3bc198d8f9d1e (patch)
tree6ed989944550a64ecd724032a01bd7ac9b4caa00 /lisp
parentaeae5875f967fb3303e6a180497e9573de1c2966 (diff)
downloademacs-cad0490b013ebcad4711b36e37a3bc198d8f9d1e.tar.gz
emacs-cad0490b013ebcad4711b36e37a3bc198d8f9d1e.tar.bz2
emacs-cad0490b013ebcad4711b36e37a3bc198d8f9d1e.zip
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)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/project.el15
1 files 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))