(spam-report-gmane): iterate over articles
authorTeodor Zlatanov <tzz@lifelogs.com>
Thu, 4 Dec 2003 19:31:38 +0000 (19:31 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Thu, 4 Dec 2003 19:31:38 +0000 (19:31 +0000)
instead of a single one; remove interactive usage

lisp/ChangeLog
lisp/spam-report.el

index 374dedf..af12f2e 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-04  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * spam-report.el (spam-report-gmane): iterate over articles
+       instead of a single one; remove interactive usage
+
 2003-12-03  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * dns.el: Fix misplaced eval-when-compile.
index cde38f8..e10639b 100644 (file)
@@ -67,18 +67,18 @@ instead."
                 spam-report-url-ping-mm-url))
   :group 'spam-report)
 
-(defun spam-report-gmane (article)
+(defun spam-report-gmane (&rest articles)
   "Report an article as spam through Gmane"
-  (interactive "nEnter the article number: ")
-  (when (and gnus-newsgroup-name
-            (or (null spam-report-gmane-regex)
-                (string-match spam-report-gmane-regex gnus-newsgroup-name)))
-    (gnus-message 6 "Reporting spam article %d to spam.gmane.org..." article)
+  (dolist (article articles)
+    (when (and gnus-newsgroup-name
+              (or (null spam-report-gmane-regex)
+                  (string-match spam-report-gmane-regex gnus-newsgroup-name)))
+      (gnus-message 6 "Reporting spam article %d to spam.gmane.org..." article)
       (if spam-report-gmane-use-article-number
          (spam-report-url-ping "spam.gmane.org" 
-                   (format "/%s:%d"
-                           (gnus-group-real-name gnus-newsgroup-name)
-                           article))
+                               (format "/%s:%d"
+                                       (gnus-group-real-name gnus-newsgroup-name)
+                                       article))
        (with-current-buffer nntp-server-buffer
          (gnus-request-head article gnus-newsgroup-name)
          (goto-char (point-min))
@@ -89,7 +89,7 @@ instead."
                (gnus-message 10 "Reporting spam through URL %s..." url)
                (spam-report-url-ping host report))
            (gnus-message 10 "Could not find X-Report-Spam in article %d..."
-                         article))))))
+                         article)))))))
 
 (defun spam-report-url-ping (host report)
   "Ping a host through HTTP, addressing a specific GET resource using