Variable: bug-reference-bug-regexp

bug-reference-bug-regexp is a customizable variable defined in bug-reference.el.gz.

Value

"\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"

Documentation

Regular expression matching bug references.

The first subexpression defines the region of the bug-reference overlay, i.e., the region being fontified and made clickable in order to browse the referenced bug in the corresponding project's issue tracker.

If bug-reference-url-format is set to a format string with single %s placeholder, the second subexpression must match the (part of the) bug reference which needs to be injected in place of the %s in order to form the bug's ticket URL.

If bug-reference-url-format is a function, the interpretation of the subexpressions larger than 1 is up to the function. However, it is checked that the bounds of all matching subexpressions from 2 to 10 are within the bounds of the subexpression 1 defining the overlay region. Larger subexpressions may also be used by the function but may lay outside the bounds of subexpressions 1 and then don't contribute to the highlighted and clickable region.

This variable was added, or its default value changed, in Emacs 28.1.

View in manual

Probably introduced at or before Emacs version 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/bug-reference.el.gz
(defcustom bug-reference-bug-regexp
  "\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"
  "Regular expression matching bug references.
The first subexpression defines the region of the bug-reference
overlay, i.e., the region being fontified and made clickable in
order to browse the referenced bug in the corresponding project's
issue tracker.

If `bug-reference-url-format' is set to a format string with
single %s placeholder, the second subexpression must match
the (part of the) bug reference which needs to be injected in
place of the %s in order to form the bug's ticket URL.

If `bug-reference-url-format' is a function, the interpretation
of the subexpressions larger than 1 is up to the function.
However, it is checked that the bounds of all matching
subexpressions from 2 to 10 are within the bounds of the
subexpression 1 defining the overlay region.  Larger
subexpressions may also be used by the function but may lay
outside the bounds of subexpressions 1 and then don't contribute
to the highlighted and clickable region."
  :type 'regexp
  ; 24.3: defconst -> defcustom
  ; 28.1: contract about subexpression 1 defines the overlay region.
  :version "28.1")