diff options
| author | Dmitry Gutov | 2015-11-08 14:46:22 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2015-11-08 14:46:22 +0200 |
| commit | cad0490b013ebcad4711b36e37a3bc198d8f9d1e (patch) | |
| tree | 6ed989944550a64ecd724032a01bd7ac9b4caa00 | |
| parent | aeae5875f967fb3303e6a180497e9573de1c2966 (diff) | |
| download | emacs-cad0490b013ebcad4711b36e37a3bc198d8f9d1e.tar.gz 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)
| -rw-r--r-- | 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 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." | |||
| 140 | (list (cdr project))) | 140 | (list (cdr project))) |
| 141 | 141 | ||
| 142 | (cl-defmethod project-library-roots ((project (head vc))) | 142 | (cl-defmethod project-library-roots ((project (head vc))) |
| 143 | (append | 143 | (project-subtract-directories |
| 144 | (let ((root (cdr project))) | 144 | (project-combine-directories |
| 145 | (mapcar | 145 | (append |
| 146 | (lambda (dir) (file-name-as-directory (expand-file-name dir root))) | 146 | (let ((root (cdr project))) |
| 147 | (project--value-in-dir 'project-vc-library-roots root))) | 147 | (mapcar |
| 148 | (cl-call-next-method))) | 148 | (lambda (dir) (file-name-as-directory (expand-file-name dir root))) |
| 149 | (project--value-in-dir 'project-vc-library-roots root))) | ||
| 150 | (funcall project-library-roots-function))) | ||
| 151 | (project-roots project))) | ||
| 149 | 152 | ||
| 150 | (cl-defmethod project-ignores ((project (head vc)) dir) | 153 | (cl-defmethod project-ignores ((project (head vc)) dir) |
| 151 | (let* ((root (cdr project)) | 154 | (let* ((root (cdr project)) |