diff --git a/lisp/spam.el b/lisp/spam.el index 097299f..5f11fad 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -1432,7 +1432,7 @@ addition to the set values for the group." (gnus-check-backend-function 'request-move-article gnus-newsgroup-name)) (respool-method (gnus-find-method-for-group gnus-newsgroup-name)) - article mark deletep respool) + article mark deletep respool invalid-move-destination) (when (member 'respool groups) (setq respool t) ; boolean for later @@ -1440,7 +1440,31 @@ addition to the set values for the group." ;; now do the actual move (dolist (group groups) - (when (and articles (stringp group)) + + (setq invalid-move-destination + (or + (and + (eq classification 'spam) + (spam-group-spam-contents-p gnus-newsgroup-name) + (spam-group-spam-contents-p group) + (gnus-message + 3 + "Sorry, can't move spam from spam group %s to spam group %s" + gnus-newsgroup-name + group)) + (and + (eq classification 'ham) + (spam-group-ham-contents-p gnus-newsgroup-name) + (spam-group-ham-contents-p group) + (gnus-message + 3 + "Sorry, can't move ham from ham group %s to ham group %s" + gnus-newsgroup-name + group)))) + + (when (and articles + (stringp group) + (not invalid-move-destination)) ;; first, mark the article with the process mark and, if needed, ;; the unread or expired mark (for ham and spam respectively)