]> git.eshelyaron.com Git - emacs.git/commitdiff
* spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p)
authorChong Yidong <cyd@stupidchicken.com>
Sun, 8 Jan 2006 21:29:46 +0000 (21:29 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 8 Jan 2006 21:29:46 +0000 (21:29 +0000)
(spam-group-spam-marks): Delete functions.
(spam-list-articles): Just call spam-group-ham-marks directly.
(spam-group-ham-marks): Simplify.

lisp/gnus/ChangeLog
lisp/gnus/spam.el

index 40adfc1d853daf2e9374cebd307a16af0fc2478c..c9c5f76c601bdfb9cd5d6b59dc2e64807057bc35 100644 (file)
@@ -1,3 +1,10 @@
+2006-01-08  Chong Yidong  <cyd@stupidchicken.com>
+
+       * spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p)
+       (spam-group-spam-marks): Delete functions.
+       (spam-list-articles): Just call spam-group-ham-marks directly.
+       (spam-group-ham-marks): Simplify.
+
 2005-12-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-signature-separator): Fix custom type.
index 32de2f60e22a7458fe54b62f326e1c21d09ae812..8b722c95586293ce7959da9a4da7380a35d626b1 100644 (file)
@@ -467,28 +467,14 @@ spamoracle database."
   "Logical exclusive `or'."
   (and (or a b) (not (and a b))))
 
-(defun spam-group-ham-mark-p (group mark &optional spam)
-  (when (stringp group)
-    (let* ((marks (spam-group-ham-marks group spam))
-          (marks (if (symbolp mark)
-                     marks
-                   (mapcar 'symbol-value marks))))
-      (memq mark marks))))
-
-(defun spam-group-spam-mark-p (group mark)
-  (spam-group-ham-mark-p group mark t))
-
 (defun spam-group-ham-marks (group &optional spam)
   (when (stringp group)
-    (let* ((marks (if spam
-                     (gnus-parameter-spam-marks group)
-                   (gnus-parameter-ham-marks group)))
-          (marks (car marks))
-          (marks (if (listp (car marks)) (car marks) marks)))
-      marks)))
-
-(defun spam-group-spam-marks (group)
-  (spam-group-ham-marks group t))
+    (let ((marks (car (if spam
+                         (gnus-parameter-spam-marks group)
+                       (gnus-parameter-ham-marks group)))))
+      (if (listp (car marks))
+         (car marks)
+       marks))))
 
 (defun spam-group-spam-contents-p (group)
   (if (stringp group)
@@ -1050,23 +1036,12 @@ functions")
       (nth 2 flist))))
 
 (defun spam-list-articles (articles classification)
-  (let ((mark-check (if (eq classification 'spam)
-                       'spam-group-spam-mark-p
-                     'spam-group-ham-mark-p))
-       list mark-cache-yes mark-cache-no)
+  (let ((marks (mapcar 'eval (spam-group-ham-marks gnus-newsgroup-name
+                                                  (eq classification 'spam))))
+       list)
     (dolist (article articles)
-      (let ((mark (gnus-summary-article-mark article)))
-       (unless (memq mark mark-cache-no)
-         (if (memq mark mark-cache-yes)
-             (push article list)
-           ;; else, we have to actually check the mark
-           (if (funcall mark-check
-                        gnus-newsgroup-name
-                        mark)
-               (progn
-                 (push article list)
-                 (push mark mark-cache-yes))
-             (push mark mark-cache-no))))))
+      (if (memq (gnus-summary-article-mark article) marks)
+         (push article list)))
     list))
 
 (defun spam-register-routine (classification