From: yamaoka Date: Tue, 11 Nov 2003 22:19:43 +0000 (+0000) Subject: Synch to Gnus 200311112008. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d538700a865a67804d58b4c6c914d49e1787f883;p=elisp%2Fgnus.git- Synch to Gnus 200311112008. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ab367c1..00bd968 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2003-11-11 Teodor Zlatanov + + * spam.el (spam-ham-copy-routine, spam-ham-move-routine) + (spam-mark-spam-as-expired-and-move-routine): allow for the + groups to be a list of a single item + + * gnus.el (gnus-install-group-spam-parameters): + ham-process-destination and spam-process-destination allow lists now + 2003-11-10 Reiner Steib * message.el (message-insert-to): Do error out when the user diff --git a/lisp/gnus.el b/lisp/gnus.el index 37ca7a4..4d5fe91 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1976,6 +1976,7 @@ spam processing, associated with the appropriate processor." (gnus-define-group-parameter spam-process-destination + :type list :parameter-type '(choice :tag "Destination for spam-processed articles at summary exit" (string :tag "Move to a group") @@ -2010,6 +2011,7 @@ mail groups." (gnus-define-group-parameter ham-process-destination + :type list :parameter-type '(choice :tag "Destination for ham articles at summary exit from a spam group" diff --git a/lisp/spam.el b/lisp/spam.el index 436e2a2..1d8beb1 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -556,41 +556,43 @@ spamoracle database." (gnus-summary-mark-article article gnus-spam-mark))))) (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) - (gnus-summary-mark-article article gnus-expirable-mark) - (push article tomove))) + (if (and groups (listp (car groups))) + (apply 'spam-mark-spam-as-expired-and-move-routine (car 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) + (gnus-summary-mark-article article gnus-expirable-mark) + (push article tomove))) - ;; now do the actual copies - (dolist (group groups) - (when (and tomove - (stringp group)) + ;; now do the actual copies + (dolist (group groups) + (when (and tomove + (stringp group)) + (dolist (article tomove) + (gnus-summary-set-process-mark article)) + (when tomove + (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, and the + ;; backend allows it + (when (and deletep backend-supports-deletions) (dolist (article tomove) (gnus-summary-set-process-mark article)) (when tomove - (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, and the - ;; backend allows it - (when (and deletep backend-supports-deletions) - (dolist (article tomove) - (gnus-summary-set-process-mark article)) - (when tomove - (let ((gnus-novice-user nil)) ; don't ask me if I'm sure - (gnus-summary-delete-article nil)))) + (let ((gnus-novice-user nil)) ; don't ask me if I'm sure + (gnus-summary-delete-article nil)))) - (gnus-summary-yank-process-mark))) + (gnus-summary-yank-process-mark)))) (defun spam-ham-copy-or-move-routine (copy groups) (gnus-summary-kill-process-mark) @@ -633,10 +635,14 @@ spamoracle database." (gnus-summary-yank-process-mark)) (defun spam-ham-copy-routine (&rest groups) - (spam-ham-copy-or-move-routine t groups)) + (if (and groups (listp (car groups))) + (apply 'spam-ham-copy-routine (car groups)) + (spam-ham-copy-or-move-routine t groups))) (defun spam-ham-move-routine (&rest groups) - (spam-ham-copy-or-move-routine nil groups)) + (if (and groups (listp (car groups))) + (apply 'spam-ham-move-routine (car groups)) + (spam-ham-copy-or-move-routine nil groups))) (defun spam-generic-register-routine (spam-func ham-func) (let ((articles gnus-newsgroup-articles)