(spam-report-gmane-internal): Fall back on Xref if all
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 30 Dec 2006 22:16:02 +0000 (22:16 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 30 Dec 2006 22:16:02 +0000 (22:16 +0000)
else fails.

lisp/ChangeLog
lisp/spam-report.el

index 3ca46a8..02812ef 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * spam-report.el (spam-report-gmane-internal): Fall back on Xref if all
+       else fails.
+
 2006-12-30  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
 
        * gnus-cite.el (turn-off-gnus-message-citation-mode): Fix typo in
index ad4b914..ec24c88 100644 (file)
@@ -163,7 +163,11 @@ Reports is as ham when HAM is set."
            (setq field (or (gnus-fetch-field "X-Report-Spam")
                            (gnus-fetch-field "X-Report-Unspam")
                            (gnus-fetch-field "Archived-At")))
-           (when (stringp field)
+           (if (not (stringp field))
+               (if (and (setq field (gnus-fetch-field "Xref"))
+                        (string-match "[^ ]+ +\\([^ ]+\\)" field))
+                   (setq report (match-string 1 field)
+                         host rpt-host))
              (setq host
                    (progn
                      (string-match
@@ -171,7 +175,8 @@ Reports is as ham when HAM is set."
                               "\\(/[^:/]+[:/][0-9]+\\)")
                       field)
                      (match-string 1 field)))
-             (setq report (match-string 2 field))
+             (setq report (match-string 2 field)))
+           (when host
              (when (string-equal "permalink.gmane.org" host)
                (setq host rpt-host)
                (setq report (gnus-replace-in-string