[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/project b3cc9f0 2/5: project-try-vc: Integrate wit
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] scratch/project b3cc9f0 2/5: project-try-vc: Integrate with VC |
Date: |
Wed, 08 Jul 2015 13:02:36 +0000 |
branch: scratch/project
commit b3cc9f09be5f08dfc6c765c9924c367f25e6b5ef
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
project-try-vc: Integrate with VC
---
lisp/progmodes/project.el | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index b18d65d..cfb7926 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -59,14 +59,11 @@ roots of any currently open related projects (if they're
meant to
be edited together). The directory names should be absolute."
(list (project-root project)))
-(defvar project-vc-root-files '(".git" ".hg" ".bzr"))
-
(defun project-try-vc (dir)
- (let* ((fun (lambda (dir)
- (let ((default-directory dir))
- (cl-some #'file-exists-p project-vc-root-files))))
- (root (locate-dominating-file dir fun)))
- (when root (cons 'vc root))))
+ (let* ((backend (vc-responsible-backend dir))
+ (root (and backend (ignore-errors
+ (vc-call-backend backend 'root dir)))))
+ (and root (cons 'vc root))))
(cl-defmethod project-root ((project (head vc)))
(cdr project))
- [Emacs-diffs] scratch/project updated (106e023 -> fc4ab93), Dmitry Gutov, 2015/07/08
- [Emacs-diffs] scratch/project 97b4004 3/5: project-try-ede: Make it work, Dmitry Gutov, 2015/07/08
- [Emacs-diffs] scratch/project 85156f5 1/5: Rename project{, -find}-functions and update some docstrings, Dmitry Gutov, 2015/07/08
- [Emacs-diffs] scratch/project b3cc9f0 2/5: project-try-vc: Integrate with VC,
Dmitry Gutov <=
- [Emacs-diffs] scratch/project 0b6fd17 4/5: project-try-vc: Ignore errors, Dmitry Gutov, 2015/07/08
- [Emacs-diffs] scratch/project fc4ab93 5/5: Actually define project-root for a `user' project, Dmitry Gutov, 2015/07/08