aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2018-05-14 15:39:21 +0200
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2018-05-14 15:39:21 +0200
commitd6258081255af9e0ee8a62110945ba93299c43c6 (patch)
tree8506fc1cb186cf8cfd7abf2701895aa11ace7ab9
parent9920d6916c71c57328b4febc0093aec7fc9d4b20 (diff)
parent13139e0353d702392cf2d6987abfc226bc4214b2 (diff)
Merge PR #7337: dir-locals: add bug-reference-mode variables
-rw-r--r--dev/tools/coqdev.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/dev/tools/coqdev.el b/dev/tools/coqdev.el
index 62fdaec80..9dd12087a 100644
--- a/dev/tools/coqdev.el
+++ b/dev/tools/coqdev.el
@@ -103,5 +103,17 @@ Note that this function is executed before _Coqproject is read if it exists."
2 (3 . 4) (5 . 6)))
(add-to-list 'compilation-error-regexp-alist 'coq-backtrace))
+(defvar bug-reference-bug-regexp)
+(defvar bug-reference-url-format)
+(defun coqdev-setup-bug-reference-mode ()
+ "Setup `bug-reference-bug-regexp' and `bug-reference-url-format' for Coq.
+
+This does not enable `bug-reference-mode'."
+ (let ((dir (coqdev-default-directory)))
+ (when dir
+ (setq-local bug-reference-bug-regexp "#\\(?2:[0-9]+\\)")
+ (setq-local bug-reference-url-format "https://github.com/coq/coq/issues/%s"))))
+(add-hook 'hack-local-variables-hook #'coqdev-setup-bug-reference-mode)
+
(provide 'coqdev)
;;; coqdev ends here