From: Andreas Schwab Date: Tue, 13 Feb 2018 11:13:27 +0000 (+0100) Subject: Don't signal error in vc-deduce-backend X-Git-Tag: emacs-26.1-rc1~220 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=69e8046;p=emacs.git Don't signal error in vc-deduce-backend * lisp/vc/vc.el (vc-deduce-backend): Return nil if vc-responsible-backend signals an error. --- diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 6516c91de3c..e767deace2e 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -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" ())