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

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

[elpa] externals/debbugs 8aa30e4 227/311: Recognize bugs.gnu.org in debb


From: Stefan Monnier
Subject: [elpa] externals/debbugs 8aa30e4 227/311: Recognize bugs.gnu.org in debbugs
Date: Sun, 29 Nov 2020 18:42:17 -0500 (EST)

branch: externals/debbugs
commit 8aa30e40a9397a82cc54ee7e373b0d5983c1264c
Author: Oleg Pykhalov <go.wigust@gmail.com>
Commit: Michael Albinus <michael.albinus@gmx.de>

    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
---
 debbugs-browse.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/debbugs-browse.el b/debbugs-browse.el
index 7e37eb6..ee00926 100644
--- a/debbugs-browse.el
+++ b/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 <michael.albinus@gmx.de>
 ;; 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]