Synch to Gnus 200311062127.
authoryamaoka <yamaoka>
Thu, 6 Nov 2003 22:31:54 +0000 (22:31 +0000)
committeryamaoka <yamaoka>
Thu, 6 Nov 2003 22:31:54 +0000 (22:31 +0000)
lisp/ChangeLog
lisp/gnus.el
lisp/spam.el

index 9f91ea3..de0b984 100644 (file)
@@ -1,3 +1,14 @@
+2003-11-06  Teodor Zlatanov  <tzz@lifelogs.com> suggested by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+       * spam.el (spam-mark-spam-as-expired-and-move-routine)
+       (spam-ham-copy-or-move-routine): prevent article deletions or
+       moves unless the backend allows it
+
+       * gnus.el (gnus-install-group-spam-parameters): fixed parameters
+       to list spamoracle as well
+
+       * spam.el (spam-spamoracle): doc change
+
 2003-11-04  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-score.el (gnus-decay-score): Protect against arithmetic
index 850d17d..ffacd8f 100644 (file)
@@ -1962,15 +1962,17 @@ spam processing, associated with the appropriate processor."
                   (variable-item gnus-group-spam-exit-processor-stat)
                   (variable-item gnus-group-spam-exit-processor-bogofilter)
                   (variable-item gnus-group-spam-exit-processor-blacklist)
+                  (variable-item gnus-group-spam-exit-processor-spamoracle)
                   (variable-item gnus-group-spam-exit-processor-report-gmane)
                   (variable-item gnus-group-ham-exit-processor-bogofilter)
                   (variable-item gnus-group-ham-exit-processor-ifile)
                   (variable-item gnus-group-ham-exit-processor-stat)
                   (variable-item gnus-group-ham-exit-processor-whitelist)
                   (variable-item gnus-group-ham-exit-processor-BBDB)
+                  (variable-item gnus-group-ham-exit-processor-spamoracle)
                   (variable-item gnus-group-ham-exit-processor-copy))))
    :parameter-document
-   "Which spam or ham processors will be appliedwhen the summary is exited.")
+   "Which spam or ham processors will be applied when the summary is exited.")
 
   (gnus-define-group-parameter
    spam-process-destination
index eb58aa6..436e2a2 100644 (file)
@@ -352,7 +352,7 @@ your main source of newsgroup names."
   :group 'spam-ifile)
 
 (defgroup spam-spamoracle nil
-  "Spam ifile configuration."
+  "Spam spamoracle configuration."
   :group 'spam)
 
 (defcustom spam-spamoracle-database nil 
@@ -558,6 +558,9 @@ spamoracle database."
 (defun spam-mark-spam-as-expired-and-move-routine (&rest groups)
   (gnus-summary-kill-process-mark)
   (let ((articles gnus-newsgroup-articles)
+       (backend-supports-deletions
+        (gnus-check-backend-function
+         'request-move-article gnus-newsgroup-name))
        article tomove deletep)
     (dolist (article articles)
       (when (eq (gnus-summary-article-mark article) gnus-spam-mark)
@@ -571,14 +574,16 @@ spamoracle database."
        (dolist (article tomove)
          (gnus-summary-set-process-mark article))
        (when tomove
-         (if (> (length groups) 1)
+         (if (or (not backend-supports-deletions)
+               (> (length groups) 1))
              (progn 
                (gnus-summary-copy-article nil group)
                (setq deletep t))
            (gnus-summary-move-article nil group)))))
     
-    ;; now delete the articles, if there was a copy done
-    (when deletep
+    ;; now delete the articles, if there was a copy done, and the
+    ;; backend allows it
+    (when (and deletep backend-supports-deletions)
       (dolist (article tomove)
        (gnus-summary-set-process-mark article))
       (when tomove
@@ -590,6 +595,9 @@ spamoracle database."
 (defun spam-ham-copy-or-move-routine (copy groups)
   (gnus-summary-kill-process-mark)
   (let ((articles gnus-newsgroup-articles)
+       (backend-supports-deletions
+        (gnus-check-backend-function
+         'request-move-article gnus-newsgroup-name))
        article mark todo deletep)
     (dolist (article articles)
       (when (spam-group-ham-mark-p gnus-newsgroup-name
@@ -604,16 +612,18 @@ spamoracle database."
            (gnus-summary-mark-article article gnus-unread-mark))
          (gnus-summary-set-process-mark article))
 
-       (if (> (length groups) 1)
+       (if (or (not backend-supports-deletions)
+               (> (length groups) 1))
            (progn 
              (gnus-summary-copy-article nil group)
              (setq deletep t))
          (gnus-summary-move-article nil group))))
-  
-    ;; now delete the articles, unless a) copy is t, and when there was a copy done
+    
+    ;; now delete the articles, unless a) copy is t, and there was a copy done
     ;;                                 b) a move was done to a single group
+    ;;                                 c) backend-supports-deletions is nil
     (unless copy
-      (when deletep
+      (when (and deletep backend-supports-deletions)
        (dolist (article todo)
          (gnus-summary-set-process-mark article))
        (when todo