+2004-04-02 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el (spam-set-difference): new function to replace
+ gnus-set-difference in spam.el
+ (spam-summary-prepare-exit): use spam-set-difference
+
2004-03-29 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-registry.el (gnus-registry-cache-file): updated to use
(new-articles (spam-list-articles
gnus-newsgroup-articles
classification))
- (changed-articles (gnus-set-difference new-articles old-articles)))
+ (changed-articles (spam-set-difference new-articles old-articles)))
;; now that we have the changed articles, we go through the processors
(dolist (processor-param spam-list-of-processors)
(let ((processor (nth 0 processor-param))
(setq spam-old-ham-articles nil)
(setq spam-old-spam-articles nil))
+(defun spam-set-difference (list1 list2)
+ "Return a set difference of LIST1 and LIST2.
+When either list is nil, the other is returned."
+ (if (and list1 list2)
+ ;; we have two non-nil lists
+ (progn
+ (dolist (item (append list1 list2))
+ (when (and (memq item list1) (memq item list2))
+ (setq list1 (delq item list1))
+ (setq list2 (delq item list2))))
+ (append list1 list2))
+ ;; if either of the lists was nil, return the other one
+ (if list1 list1 list2)))
+
(defun spam-mark-junk-as-spam-routine ()
;; check the global list of group names spam-junk-mailgroups and the
;; group parameters