Adjust bug-reference-bug-regexp default values to match only at beg of word
Previously, the "bug 1" in "(debug 1)" has also been highlighted. * lisp/progmodes/bug-reference.el (bug-reference-bug-regexp) (bug-reference--setup-from-vc-alist,bug-reference-setup-from-mail-alist) (bug-reference-setup-from-irc-alist): Adjust bug-reference-bug-regexp default values to match only at the beginning of a word.
This commit is contained in:
parent
c1cf95a0e1
commit
380981ddb5
1 changed files with 4 additions and 4 deletions
|
@ -72,7 +72,7 @@ so that it is considered safe, see `enable-local-variables'.")
|
||||||
(get s 'bug-reference-url-format)))))
|
(get s 'bug-reference-url-format)))))
|
||||||
|
|
||||||
(defcustom bug-reference-bug-regexp
|
(defcustom bug-reference-bug-regexp
|
||||||
"\\(\\(?:[Bb]ug ?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"
|
"\\(\\b\\(?:[Bb]ug ?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"
|
||||||
"Regular expression matching bug references.
|
"Regular expression matching bug references.
|
||||||
The first subexpression defines the region of the bug-reference
|
The first subexpression defines the region of the bug-reference
|
||||||
overlay, i.e., the region being fontified and made clickable in
|
overlay, i.e., the region being fontified and made clickable in
|
||||||
|
@ -350,7 +350,7 @@ generated from `bug-reference-forge-alist'."
|
||||||
;; `bug-reference-url-format' and
|
;; `bug-reference-url-format' and
|
||||||
;; `bug-reference-bug-regexp' aren't set already.
|
;; `bug-reference-bug-regexp' aren't set already.
|
||||||
("git\\.\\(?:sv\\|savannah\\)\\.gnu\\.org:"
|
("git\\.\\(?:sv\\|savannah\\)\\.gnu\\.org:"
|
||||||
"\\<\\(\\(?:[Bb]ug ?#?\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)\\>"
|
"\\(\\b\\(?:[Bb]ug ?#?\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)\\>"
|
||||||
,(lambda (_) "https://debbugs.gnu.org/%s"))
|
,(lambda (_) "https://debbugs.gnu.org/%s"))
|
||||||
|
|
||||||
;; Entries for the software forges of
|
;; Entries for the software forges of
|
||||||
|
@ -395,7 +395,7 @@ applicable."
|
||||||
,(regexp-opt '("@debbugs.gnu.org" "-devel@gnu.org"
|
,(regexp-opt '("@debbugs.gnu.org" "-devel@gnu.org"
|
||||||
;; List-Id of Gnus devel mailing list.
|
;; List-Id of Gnus devel mailing list.
|
||||||
"ding.gnus.org"))
|
"ding.gnus.org"))
|
||||||
"\\([Bb]ug ?#?\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"
|
"\\(\\b[Bb]ug ?#?\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"
|
||||||
"https://debbugs.gnu.org/%s"))
|
"https://debbugs.gnu.org/%s"))
|
||||||
"An alist for setting up `bug-reference-mode' in mail modes.
|
"An alist for setting up `bug-reference-mode' in mail modes.
|
||||||
|
|
||||||
|
@ -526,7 +526,7 @@ From, and Cc against HEADER-REGEXP in
|
||||||
`((,(concat "#" (regexp-opt '("emacs" "gnus" "org-mode" "rcirc"
|
`((,(concat "#" (regexp-opt '("emacs" "gnus" "org-mode" "rcirc"
|
||||||
"erc") 'words))
|
"erc") 'words))
|
||||||
"Libera.Chat"
|
"Libera.Chat"
|
||||||
"\\([Bb]ug ?#?\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"
|
"\\(\\b[Bb]ug ?#?\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)"
|
||||||
"https://debbugs.gnu.org/%s"))
|
"https://debbugs.gnu.org/%s"))
|
||||||
"An alist for setting up `bug-reference-mode' in IRC modes.
|
"An alist for setting up `bug-reference-mode' in IRC modes.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue