(gnus-button-man-handler): New variable.
authorSimon Josefsson <jas@extundo.com>
Mon, 9 Sep 2002 13:40:28 +0000 (13:40 +0000)
committerSimon Josefsson <jas@extundo.com>
Mon, 9 Sep 2002 13:40:28 +0000 (13:40 +0000)
(gnus-button-alist): Use g-b-handle-man.
(gnus-button-handle-man): New, call g-b-man-handler.

lisp/ChangeLog
lisp/gnus-art.el

index faabeb5..dec07eb 100644 (file)
@@ -1,3 +1,9 @@
+2002-09-09  Simon Josefsson  <jas@extundo.com>
+
+       * gnus-art.el (gnus-button-man-handler): New variable.
+       (gnus-button-alist): Use g-b-handle-man.
+       (gnus-button-handle-man): New, call g-b-man-handler.
+
 2002-09-08  Simon Josefsson  <jas@extundo.com>
 
        * gnus-art.el (gnus-button-alist): Buttonize man page links.
index 2602508..4843219 100644 (file)
@@ -5229,6 +5229,15 @@ groups."
   :group 'gnus-article-buttons
   :type 'regexp)
 
+(defcustom gnus-button-man-handler 'man
+  "Function to use for displaying man pages.
+The function must take at least one argument with a string naming the
+man page."
+  :type '(choice (function :tag "Man" man)
+                (function :tag "Woman" woman)
+                function)
+  :group 'gnus-article-buttons)
+
 (defcustom gnus-button-alist
   '(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>"
      0 t gnus-button-handle-news 3)
@@ -5251,7 +5260,7 @@ groups."
     ;; Raw URLs.
     (gnus-button-url-regexp 0 t browse-url 0)
     ;; man pages
-    ("\\b\\([a-z]+\\)([0-9])\\W" 0 t man 1))
+    ("\\b\\([a-z]+\\)([0-9])\\W" 0 t gnus-button-handle-man 1))
   "*Alist of regexps matching buttons in article bodies.
 
 Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
@@ -5625,6 +5634,10 @@ specified by `gnus-button-alist'."
      (group
       (gnus-button-fetch-group url)))))
 
+(defun gnus-button-handle-man (url)
+  "Fetch a man page."
+  (funcall gnus-button-man-handler url))
+
 (defun gnus-button-handle-info (url)
   "Fetch an info URL."
   (if (string-match