From bb37679b41a233886e37771d168b77e157fbe18e Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 24 Jun 2018 12:10:55 -0300 Subject: re-apply 52_gnus-BTS_bug218286.diff from emacs-goodies-el --- gnus-BTS.el | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'gnus-BTS.el') diff --git a/gnus-BTS.el b/gnus-BTS.el index bdbcf31..1a57a89 100644 --- a/gnus-BTS.el +++ b/gnus-BTS.el @@ -3,7 +3,6 @@ ;; Copyright (C) 2001 Andreas Fuchs ;; Author: Andreas Fuchs -;; Maintainer: Andreas Fuchs ;; Keywords: gnus, Debian, Bug ;; Status: Works in XEmacs (I think >=21) ;; Created: 2001-02-07 @@ -59,6 +58,13 @@ ;; Wrong regexp part of gnus-dbts-debian-bug-regexp called by ;; gnus-dbts-buttonize-debian (Closes #363161, #442438). ;; +;; 2007-09-24 intrigeri +;; Peter S Galbraith +;; +;; Bug#218286: [Fwd: Re: [gnus-BTS] please make bug numbers in mail +;; clickable to read them as email. +;; Introduce `gnus-dbts-read-bugs-as-email' +;; ;;; Code: @@ -66,6 +72,12 @@ (autoload 'thing-at-point "thingatpt") +(defcustom gnus-dbts-read-bugs-as-email nil + "If t, highlighted Debian bug numbers' buttons call + `debian-bug-get-bug-as-email'; else, `browse-url' is used." + :type 'boolean + :group 'gnus-BTS) + (defvar gnus-dbts-in-debian-group-p nil) (defvar gnus-dbts-in-debian-devel-announce-group-p nil) @@ -102,6 +114,9 @@ (defvar gnus-dbts-debian-reassign-regexp "reassigned from package `\\([^']*\\)' to `\\([^']*\\)'") +;; debian-bug-get-bug-as-email autoload +(require 'debian-el-loaddefs) + (defun gnus-dbts-browse-debpkg-or-bug (thing) (interactive "i") (let* ((the-thing (if (null thing) @@ -118,7 +133,9 @@ (concat "http://bugs.debian.org/cgi-bin/bugreport.cgi" "?&searchon=names&version=all&release=all&keywords=")))) - (browse-url (concat url bug-or-feature)))) + (if (and bugp gnus-dbts-read-bugs-as-email) + (debian-bug-get-bug-as-email bug-or-feature) + (browse-url (concat url bug-or-feature))))) (defun gnus-dbts-buttonize-debian (regexp num predicate) (add-to-list 'gnus-button-alist -- cgit v1.2.3