Subject: Re: bug#14950: 24.3.50; gnus: Fontification of URLs is not satisfactory

From: Andreas Schwab <[email-masked]>
Date: Thu, 25 Jul 2013 15:11:59 +0200

Katsumi Yamaoka <[email-masked]> writes:

> What should be improved is the default value of the user option
> `gnus-button-url-regexp'.  But it is too complicated to let me
> encourage to do it without enbugging.  Anyone?

How about this?

diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 31a108a..2433db2 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7177,7 +7177,8 @@ groups."
 	  "\\(?:"
 	  ;; Match paired parentheses, e.g. in Wikipedia URLs:
 	  ;; http://thread.gmane.org/[email-masked]
-	  "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "[" chars "]*"
+	  "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)"
+	  "\\(?:" "[" chars punct "]+" "[" chars "]" "\\)?"
 	  "\\|"
 	  "[" chars punct     "]+" "[" chars "]"
 	  "\\)"))

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."