emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master c826ed8 1/2: Recognize bugs.gnu.org in debbugs


From: Michael Albinus
Subject: [elpa] master c826ed8 1/2: Recognize bugs.gnu.org in debbugs
Date: Wed, 17 Jan 2018 10:24:29 -0500 (EST)

branch: master
commit c826ed8c733af3b74b8608782da5d1b429a4fee6
Author: Oleg Pykhalov <address@hidden>
Commit: Michael Albinus <address@hidden>

    Recognize bugs.gnu.org in debbugs
    
    * packages/debbugs/debbugs-browse.el (debbugs-browse-url-regexp):
    New defcustom.
    (debbugs-browse-url): Recognize bugs.gnu.org.
    
    Copyright-paperwork-exempt: yes
---
 packages/debbugs/debbugs-browse.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/packages/debbugs/debbugs-browse.el 
b/packages/debbugs/debbugs-browse.el
index 7e37eb6..ee00926 100644
--- a/packages/debbugs/debbugs-browse.el
+++ b/packages/debbugs/debbugs-browse.el
@@ -1,6 +1,6 @@
 ;; debbugs-browse.el --- browse bug URLs with debbugs-gnu or debbugs-org
 
-;; Copyright (C) 2015-2017 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2018 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <address@hidden>
 ;; Keywords: comm, hypermedia, maint
@@ -36,15 +36,18 @@ This can be either `debbugs-gnu-bugs' or 
`debbugs-org-bugs'."
                 (const debbugs-org-bugs))
   :version "25.1")
 
+(defcustom debbugs-browse-url-regexp
+  (format "^%s\\(%s\\)?\\([[:digit:]]+\\)$"
+         "https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/"
+         (regexp-quote "cgi/bugreport.cgi?bug="))
+  "Regexp matching Debbugs bug report URL."
+  :group 'debbugs-gnu
+  :type  'regexp)
+
 (defun debbugs-browse-url (url &optional _new-window)
   (when (and (stringp url)
-            (string-match
-             (format
-              "^%s\\(%s\\)?\\([[:digit:]]+\\)$"
-              "https?://debbugs\\.gnu\\.org/"
-              (regexp-quote "cgi/bugreport.cgi?bug="))
-             url))
-    (funcall debbugs-browse-function (string-to-number (match-string 2 url)))
+            (string-match debbugs-browse-url-regexp url))
+    (funcall debbugs-browse-function (string-to-number (match-string 3 url)))
     ;; Return t for add-function mechanery.
     t))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]