aboutsummaryrefslogtreecommitdiffhomepage
path: root/dev/tools
diff options
context:
space:
mode:
authorGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2018-04-24 16:21:33 +0200
committerGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2018-05-11 13:46:50 +0200
commit13139e0353d702392cf2d6987abfc226bc4214b2 (patch)
tree31860d96f75f82e552a175ccc7bc0da6b0a63b91 /dev/tools
parent5c34cfa54ec1959758baa3dd283e2e30853380db (diff)
coqdev.el: add bug-reference-mode variables
Diffstat (limited to 'dev/tools')
-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