[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2a29130: Make debbugs install a handler in browse-url-defa
From: |
Tassilo Horn |
Subject: |
[elpa] master 2a29130: Make debbugs install a handler in browse-url-default-handlers. |
Date: |
Thu, 7 May 2020 08:20:09 -0400 (EDT) |
branch: master
commit 2a291308f1c72bf030a5ebecd9516bda00e9293e
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Make debbugs install a handler in browse-url-default-handlers.
* packages/debbugs/debbugs-browse.el: Install a handler in
browse-url-default-handlers.
(debbugs-browse-gnu-url-regexp): New defconst set to former
debbugs-browse-url-regexp init value.
(debbugs-browse-url-regexp): Use it.
---
packages/debbugs/debbugs-browse.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/packages/debbugs/debbugs-browse.el
b/packages/debbugs/debbugs-browse.el
index b0354f9..ef3e913 100644
--- a/packages/debbugs/debbugs-browse.el
+++ b/packages/debbugs/debbugs-browse.el
@@ -36,10 +36,15 @@ This can be either `debbugs-gnu-bugs' or
`debbugs-org-bugs'."
(const debbugs-org-bugs))
:version "25.1")
-(defcustom debbugs-browse-url-regexp
+;;;###autoload
+(defconst debbugs-browse-gnu-url-regexp
(format "^%s\\(%s\\)?\\([[:digit:]]+\\)$"
"https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/"
(regexp-quote "cgi/bugreport.cgi?bug="))
+ "A regular expression matching bug report URLs on GNU's debbugs instance.")
+
+(defcustom debbugs-browse-url-regexp
+ debbugs-browse-gnu-url-regexp
"Regexp matching Debbugs bug report URL."
:group 'debbugs-gnu
:type 'regexp)
@@ -52,6 +57,11 @@ This can be either `debbugs-gnu-bugs' or `debbugs-org-bugs'."
t))
;;;###autoload
+(when (boundp 'browse-url-default-handlers)
+ (add-to-list 'browse-url-default-handlers
+ `(,debbugs-browse-gnu-url-regexp . debbugs-browse-url)))
+
+;;;###autoload
(define-minor-mode debbugs-browse-mode
"Browse GNU Debbugs bug URLs with debbugs-gnu or debbugs-org.
With a prefix argument ARG, enable Debbugs Browse mode if ARG is
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 2a29130: Make debbugs install a handler in browse-url-default-handlers.,
Tassilo Horn <=