Synch to No Gnus 200602061648.
authoryamaoka <yamaoka>
Mon, 6 Feb 2006 22:04:10 +0000 (22:04 +0000)
committeryamaoka <yamaoka>
Mon, 6 Feb 2006 22:04:10 +0000 (22:04 +0000)
lisp/ChangeLog
lisp/spam-report.el

index 1976590..b3d5345 100644 (file)
@@ -1,3 +1,10 @@
+2006-02-06  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * spam-report.el (spam-report-gmane-use-article-number): Improve
+       doc string.
+       (spam-report-gmane-internal): Check if a suitable header was found
+       in the article.
+
 2006-02-04  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * rfc2231.el (rfc2231-parse-string): Revert 2006-02-03 change.
index a7179d5..3f5c726 100644 (file)
@@ -50,7 +50,11 @@ instead."
   :group 'spam-report)
 
 (defcustom spam-report-gmane-use-article-number t
-  "Whether the article number (faster!) or the header should be used."
+  "Whether the article number (faster!) or the header should be used.
+
+You must set this to nil if you don't read Gmane groups directly
+from news.gmane.org, e.g. when using local newsserver such as
+leafnode."
   :type 'boolean
   :group 'spam-report)
 
@@ -158,18 +162,20 @@ 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")))
-           (setq host (progn
-                        (string-match
-                         (concat "http://\\([a-z]+\\.gmane\\.org\\)"
-                                 "\\(/[^:/]+[:/][0-9]+\\)")
-                         field)
-                        (match-string 1 field)))
-           (setq report (match-string 2 field))
-           (when (string-equal "permalink.gmane.org" host)
-             (setq host rpt-host)
-             (setq report (gnus-replace-in-string
-                           report "/\\([0-9]+\\)$" ":\\1")))
-           (setq url (format "http://%s%s" host report))
+           (when (stringp field)
+             (setq host
+                   (progn
+                     (string-match
+                      (concat "http://\\([a-z]+\\.gmane\\.org\\)"
+                              "\\(/[^:/]+[:/][0-9]+\\)")
+                      field)
+                     (match-string 1 field)))
+             (setq report (match-string 2 field))
+             (when (string-equal "permalink.gmane.org" host)
+               (setq host rpt-host)
+               (setq report (gnus-replace-in-string
+                             report "/\\([0-9]+\\)$" ":\\1")))
+             (setq url (format "http://%s%s" host report)))
            (if (not (and host report url))
                (gnus-message
                 3 "Could not find a spam report header in article %d..."