summaryrefslogtreecommitdiff
path: root/lisp/gnus/spam.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-01-08 21:29:46 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-01-08 21:29:46 +0000
commit447505b50802ad56b9cefc966b79db373ae2b846 (patch)
tree091a8ab842831d18530ef090c3b130b1bb9cae7b /lisp/gnus/spam.el
parent80068231395d24637ec3b0e83a3dedf78b875471 (diff)
downloademacs-447505b50802ad56b9cefc966b79db373ae2b846.tar.gz
* 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.
Diffstat (limited to 'lisp/gnus/spam.el')
-rw-r--r--lisp/gnus/spam.el47
1 files changed, 11 insertions, 36 deletions
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index 32de2f60e22..8b722c95586 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -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