diff options
| author | Chong Yidong | 2006-01-08 21:29:46 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-01-08 21:29:46 +0000 |
| commit | 447505b50802ad56b9cefc966b79db373ae2b846 (patch) | |
| tree | 091a8ab842831d18530ef090c3b130b1bb9cae7b | |
| parent | 80068231395d24637ec3b0e83a3dedf78b875471 (diff) | |
| download | emacs-447505b50802ad56b9cefc966b79db373ae2b846.tar.gz emacs-447505b50802ad56b9cefc966b79db373ae2b846.zip | |
* 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.
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/spam.el | 47 |
2 files changed, 18 insertions, 36 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 40adfc1d853..c9c5f76c601 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2006-01-08 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p) | ||
| 4 | (spam-group-spam-marks): Delete functions. | ||
| 5 | (spam-list-articles): Just call spam-group-ham-marks directly. | ||
| 6 | (spam-group-ham-marks): Simplify. | ||
| 7 | |||
| 1 | 2005-12-16 Katsumi Yamaoka <yamaoka@jpl.org> | 8 | 2005-12-16 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 9 | ||
| 3 | * gnus-art.el (gnus-signature-separator): Fix custom type. | 10 | * gnus-art.el (gnus-signature-separator): Fix custom type. |
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." | |||
| 467 | "Logical exclusive `or'." | 467 | "Logical exclusive `or'." |
| 468 | (and (or a b) (not (and a b)))) | 468 | (and (or a b) (not (and a b)))) |
| 469 | 469 | ||
| 470 | (defun spam-group-ham-mark-p (group mark &optional spam) | ||
| 471 | (when (stringp group) | ||
| 472 | (let* ((marks (spam-group-ham-marks group spam)) | ||
| 473 | (marks (if (symbolp mark) | ||
| 474 | marks | ||
| 475 | (mapcar 'symbol-value marks)))) | ||
| 476 | (memq mark marks)))) | ||
| 477 | |||
| 478 | (defun spam-group-spam-mark-p (group mark) | ||
| 479 | (spam-group-ham-mark-p group mark t)) | ||
| 480 | |||
| 481 | (defun spam-group-ham-marks (group &optional spam) | 470 | (defun spam-group-ham-marks (group &optional spam) |
| 482 | (when (stringp group) | 471 | (when (stringp group) |
| 483 | (let* ((marks (if spam | 472 | (let ((marks (car (if spam |
| 484 | (gnus-parameter-spam-marks group) | 473 | (gnus-parameter-spam-marks group) |
| 485 | (gnus-parameter-ham-marks group))) | 474 | (gnus-parameter-ham-marks group))))) |
| 486 | (marks (car marks)) | 475 | (if (listp (car marks)) |
| 487 | (marks (if (listp (car marks)) (car marks) marks))) | 476 | (car marks) |
| 488 | marks))) | 477 | marks)))) |
| 489 | |||
| 490 | (defun spam-group-spam-marks (group) | ||
| 491 | (spam-group-ham-marks group t)) | ||
| 492 | 478 | ||
| 493 | (defun spam-group-spam-contents-p (group) | 479 | (defun spam-group-spam-contents-p (group) |
| 494 | (if (stringp group) | 480 | (if (stringp group) |
| @@ -1050,23 +1036,12 @@ functions") | |||
| 1050 | (nth 2 flist)))) | 1036 | (nth 2 flist)))) |
| 1051 | 1037 | ||
| 1052 | (defun spam-list-articles (articles classification) | 1038 | (defun spam-list-articles (articles classification) |
| 1053 | (let ((mark-check (if (eq classification 'spam) | 1039 | (let ((marks (mapcar 'eval (spam-group-ham-marks gnus-newsgroup-name |
| 1054 | 'spam-group-spam-mark-p | 1040 | (eq classification 'spam)))) |
| 1055 | 'spam-group-ham-mark-p)) | 1041 | list) |
| 1056 | list mark-cache-yes mark-cache-no) | ||
| 1057 | (dolist (article articles) | 1042 | (dolist (article articles) |
| 1058 | (let ((mark (gnus-summary-article-mark article))) | 1043 | (if (memq (gnus-summary-article-mark article) marks) |
| 1059 | (unless (memq mark mark-cache-no) | 1044 | (push article list))) |
| 1060 | (if (memq mark mark-cache-yes) | ||
| 1061 | (push article list) | ||
| 1062 | ;; else, we have to actually check the mark | ||
| 1063 | (if (funcall mark-check | ||
| 1064 | gnus-newsgroup-name | ||
| 1065 | mark) | ||
| 1066 | (progn | ||
| 1067 | (push article list) | ||
| 1068 | (push mark mark-cache-yes)) | ||
| 1069 | (push mark mark-cache-no)))))) | ||
| 1070 | list)) | 1045 | list)) |
| 1071 | 1046 | ||
| 1072 | (defun spam-register-routine (classification | 1047 | (defun spam-register-routine (classification |