diff options
| -rw-r--r-- | lisp/progmodes/project.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 03f7c995e85..702e69ba539 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -294,11 +294,14 @@ The directory names should be absolute. Used in the VC project | |||
| 294 | backend implementation of `project-external-roots'.") | 294 | backend implementation of `project-external-roots'.") |
| 295 | 295 | ||
| 296 | (defun project-try-vc (dir) | 296 | (defun project-try-vc (dir) |
| 297 | (let* ((backend (ignore-errors (vc-responsible-backend dir))) | 297 | (let* ((backend |
| 298 | ;; FIXME: This is slow. Cache it. | ||
| 299 | (ignore-errors (vc-responsible-backend dir))) | ||
| 298 | (root | 300 | (root |
| 299 | (pcase backend | 301 | (pcase backend |
| 300 | ('Git | 302 | ('Git |
| 301 | ;; Don't stop at submodule boundary. | 303 | ;; Don't stop at submodule boundary. |
| 304 | ;; FIXME: Cache for a shorter time. | ||
| 302 | (or (vc-file-getprop dir 'project-git-root) | 305 | (or (vc-file-getprop dir 'project-git-root) |
| 303 | (let ((root (vc-call-backend backend 'root dir))) | 306 | (let ((root (vc-call-backend backend 'root dir))) |
| 304 | (vc-file-setprop | 307 | (vc-file-setprop |