Make bug-reference-bug-regexp customizable

Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00427.html

* lisp/progmodes/bug-reference.el (bug-reference): New custom group.
(bug-reference-bug-regexp): Make it a defcustom.
This commit is contained in:
Glenn Morris 2012-08-21 23:47:00 -07:00
parent 37219830c7
commit 2b2c07948e
2 changed files with 16 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2012-08-22 Glenn Morris <rgm@gnu.org>
* progmodes/bug-reference.el (bug-reference): New custom group.
(bug-reference-bug-regexp): Make it a defcustom.
2012-08-22 Daiki Ueno <ueno@unixuser.org>
* progmodes/js.el (js-indent-level, js-expr-indent-offset)

View file

@ -32,6 +32,11 @@
;;; Code:
(defgroup bug-reference nil
"Hyperlinking references to bug reports"
;; Somewhat arbitrary, by analogy with eg goto-address.
:group 'comm)
(defvar bug-reference-map
(let ((map (make-sparse-keymap)))
(define-key map [mouse-2] 'bug-reference-push-button)
@ -63,9 +68,13 @@ so that it is considered safe, see `enable-local-variables'.")
(and (symbolp s)
(get s 'bug-reference-url-format)))))
(defconst bug-reference-bug-regexp
(defcustom bug-reference-bug-regexp
"\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)"
"Regular expression which matches bug references.")
"Regular expression matching bug references.
The second subexpression should match the bug reference (usually a number)."
:type 'string
:safe 'stringp
:group 'bug-reference)
(defun bug-reference-set-overlay-properties ()
"Set properties of bug reference overlays."