]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't signal error in vc-deduce-backend
authorAndreas Schwab <schwab@suse.de>
Tue, 13 Feb 2018 11:13:27 +0000 (12:13 +0100)
committerAndreas Schwab <schwab@suse.de>
Tue, 13 Feb 2018 11:18:25 +0000 (12:18 +0100)
* lisp/vc/vc.el (vc-deduce-backend): Return nil if
vc-responsible-backend signals an error.

lisp/vc/vc.el

index 6516c91de3cce3ccd8d2c16f15d810d89211c211..e767deace2ed9a45a55d3d58c9c72fad3d1baf68 100644 (file)
@@ -996,7 +996,9 @@ Within directories, only files already under version control are noticed."
        ((derived-mode-p 'diff-mode)     diff-vc-backend)
         ;; Maybe we could even use comint-mode rather than shell-mode?
        ((derived-mode-p 'dired-mode 'shell-mode 'compilation-mode)
-        (vc-responsible-backend default-directory))
+        (condition-case nil
+             (vc-responsible-backend default-directory)
+           (error nil)))
        (vc-mode (vc-backend buffer-file-name))))
 
 (declare-function vc-dir-current-file "vc-dir" ())