Mercurial > emacs
diff lisp/gnus/spam.el @ 90261:7beb78bc1f8e
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 616-696)
- Add lisp/mh-e/.arch-inventory
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords.
- lisp/gnus/ChangeLog: Remove duplicate entry
* gnus--rel--5.10 (patch 147-181)
- Update from CVS
- Merge from emacs--cvs-trunk--0
- Update from CVS: lisp/mml.el (mml-preview): Doc fix.
- Update from CVS: texi/message.texi: Fix default values.
- Update from CVS: texi/gnus.texi (RSS): Addition.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 16 Jan 2006 08:37:27 +0000 |
parents | 2212a4afa3ce |
children | 873a6f48b596 |
line wrap: on
line diff
--- a/lisp/gnus/spam.el Mon Jan 16 06:59:21 2006 +0000 +++ b/lisp/gnus/spam.el Mon Jan 16 08:37:27 2006 +0000 @@ -467,28 +467,14 @@ "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 @@ (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