Synch to Gnus 200312042316.
authoryamaoka <yamaoka>
Thu, 4 Dec 2003 23:28:11 +0000 (23:28 +0000)
committeryamaoka <yamaoka>
Thu, 4 Dec 2003 23:28:11 +0000 (23:28 +0000)
lisp/ChangeLog
lisp/spam-report.el
texi/ChangeLog
texi/gnus-ja.texi
texi/gnus.texi

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
index 45cd99e..4e552a9 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-04  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus.texi (SpamAssassin, Fancy Mail Splitting): add
+       save-restriction before (widen) in the example.  From Kevin Ryde
+       <user42@zip.com.au>.
+
 2003-12-03  Simon Josefsson  <jas@extundo.com>
 
        * emacs-mime.texi (Flowed text): Fix.
index 124a119..27c859f 100644 (file)
@@ -13181,18 +13181,19 @@ UNDELETED} \e$B$O$*$=$i$/$?$$$F$$$N?M$K$O:GNI$NA*Br$G$7$g$&$,!"$H$-$I\e(B
 @lisp
 (defun split-on-body ()
   (save-excursion
-    (widen)
-    (goto-char (point-min))
-    (when (re-search-forward "Some.*string" nil t)
-      "string.group")))
+    (save-restriction
+      (widen)
+      (goto-char (point-min))
+      (when (re-search-forward "Some.*string" nil t)
+        "string.group"))))
 @end lisp
 
 @var{function} \e$B$,Av$i$5$l$k$H$-!"%P%C%U%!$O%a%C%;!<%8$NItJ,$K69$a$i$l$^\e(B
-\e$B$9!#$=$l$,!">e5-$NNc$G\e(B @code{save-excursion} \e$B$N8e$G\e(B @code{(widen)} \e$B$,8F\e(B
-\e$B$P$l$kI,MW$,$"$kM}M3$G$9!#$5$i$K\e(B nnimap \e$B%P%C%/%(%s%I$N>l9g!"%G%#%U%)%k%H\e(B
-\e$B$G$O5-;v$N%\%G%#$,%@%&%s%m!<%I$5$l$J$$$3$H$KCm0U$7$F2<$5$$!#$=$l$r$9$k$?\e(B
-\e$B$a$K$O!"\e(B@code{nnimap-split-download-body} \e$B$r\e(B t \e$B$K@_Dj$9$kI,MW$,$"$j$^\e(B
-\e$B$9\e(B (@pxref{Splitting in IMAP})\e$B!#\e(B
+\e$B$9!#$=$l$,>e5-$NNc$G\e(B @code{save-excursion} \e$B$H\e(B @code{save-restriction} \e$B$N\e(B
+\e$B8e$G\e(B @code{(widen)} \e$B$,8F$P$l$kI,MW$,$"$kM}M3$G$9!#$5$i$K\e(B nnimap \e$B%P%C%/%(\e(B
+\e$B%s%I$N>l9g!"%G%#%U%)%k%H$G$O5-;v$N%\%G%#$,%@%&%s%m!<%I$5$l$J$$$3$H$KCm0U\e(B
+\e$B$7$F2<$5$$!#$=$l$r$9$k$?$a$K$O\e(B @code{nnimap-split-download-body} \e$B$r\e(B t \e$B$K\e(B
+\e$B@_Dj$9$kI,MW$,$"$j$^$9\e(B (@pxref{Splitting in IMAP})\e$B!#\e(B
 
 @item (! @var{func} @var{split})
 \e$BJ,3d$,%j%9%H$G!":G=i$NMWAG$,\e(B @code{!} \e$B$G$"$k$H\e(B @var{split} \e$B$,<B9T$5$l!"\e(B
index e593b03..7286e92 100644 (file)
@@ -13937,18 +13937,20 @@ body of the messages:
 @lisp
 (defun split-on-body ()
   (save-excursion
-    (widen)
-    (goto-char (point-min))
-    (when (re-search-forward "Some.*string" nil t)
-      "string.group")))
+    (save-restriction
+      (widen)
+      (goto-char (point-min))
+      (when (re-search-forward "Some.*string" nil t)
+        "string.group"))))
 @end lisp
 
 The buffer is narrowed to the message in question when @var{function}
 is run.  That's why @code{(widen)} needs to be called after
-@code{save-excursion} in the example above.  Also note that with the
-nnimap backend, message bodies will not be downloaded by default.  You
-need to set @code{nnimap-split-download-body} to t to do that
-(@pxref{Splitting in IMAP}).
+@code{save-excursion} and @code{save-restriction} in the example
+above.  Also note that with the nnimap backend, message bodies will
+not be downloaded by default.  You need to set
+@code{nnimap-split-download-body} to t to do that (@pxref{Splitting in
+IMAP}).
 
 @item (! @var{func} @var{split})
 If the split is a list, and the first element is @code{!}, then
@@ -22299,10 +22301,11 @@ call the external tools during splitting.  Example fancy split method:
                              ...))
 (defun kevin-spamassassin ()
   (save-excursion
-    (widen)
-    (if (eq 1 (call-process-region (point-min) (point-max)
-                                  "spamc" nil nil nil "-c"))
-       "spam")))
+    (save-restriction
+      (widen)
+      (if (eq 1 (call-process-region (point-min) (point-max)
+                                     "spamc" nil nil nil "-c"))
+          "spam"))))
 @end lisp
 
 Note that with the nnimap backend, message bodies will not be