aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/bug-reference.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 50bd3661eff..e142c693503 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -212,8 +212,11 @@ URL-REGEXP against the VCS URL and returns the value to be set as
212 "Try setting up `bug-reference-mode' based on VC information. 212 "Try setting up `bug-reference-mode' based on VC information.
213Test each configuration in `bug-reference-setup-from-vc-alist' 213Test each configuration in `bug-reference-setup-from-vc-alist'
214and apply it if applicable." 214and apply it if applicable."
215 (when buffer-file-name 215 (let ((file-or-dir (or buffer-file-name
216 (let* ((backend (vc-responsible-backend buffer-file-name t)) 216 ;; Catches modes such as vc-dir and Magit.
217 default-directory))))
218 (when file-or-dir
219 (let* ((backend (vc-responsible-backend file-or-dir t))
217 (url 220 (url
218 (or (ignore-errors 221 (or (ignore-errors
219 (vc-call-backend backend 'repository-url "upstream")) 222 (vc-call-backend backend 'repository-url "upstream"))