diff options
| author | Reiner Steib | 2006-01-19 21:42:22 +0000 |
|---|---|---|
| committer | Reiner Steib | 2006-01-19 21:42:22 +0000 |
| commit | 30c7240d141cb17ce35f762ba0d4e1a423160588 (patch) | |
| tree | b49c5df7330d83db61f507b5440d02f4c89c2587 | |
| parent | 995f2df9d1c12c73077ecced0530bafa5cf91cf9 (diff) | |
| download | emacs-30c7240d141cb17ce35f762ba0d4e1a423160588.tar.gz emacs-30c7240d141cb17ce35f762ba0d4e1a423160588.zip | |
(spam-group-ham-mark-p, spam-group-spam-mark-p)
(spam-group-spam-marks, spam-list-articles, spam-group-ham-marks):
Revert 2006-01-08 change because the functions will be used in No
Gnus.
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/spam.el | 47 |
2 files changed, 43 insertions, 11 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 6e0405c24eb..7ad94aee8f0 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2006-01-19 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p) | ||
| 4 | (spam-group-spam-marks, spam-list-articles, spam-group-ham-marks): | ||
| 5 | Revert 2006-01-08 change because the functions will be used in No | ||
| 6 | Gnus. | ||
| 7 | |||
| 1 | 2006-01-16 Katsumi Yamaoka <yamaoka@jpl.org> | 8 | 2006-01-16 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 9 | ||
| 3 | * nnrss.el: Update copyright. | 10 | * nnrss.el: Update copyright. |
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 8b722c95586..32de2f60e22 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el | |||
| @@ -467,14 +467,28 @@ 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 | |||
| 470 | (defun spam-group-ham-marks (group &optional spam) | 481 | (defun spam-group-ham-marks (group &optional spam) |
| 471 | (when (stringp group) | 482 | (when (stringp group) |
| 472 | (let ((marks (car (if spam | 483 | (let* ((marks (if spam |
| 473 | (gnus-parameter-spam-marks group) | 484 | (gnus-parameter-spam-marks group) |
| 474 | (gnus-parameter-ham-marks group))))) | 485 | (gnus-parameter-ham-marks group))) |
| 475 | (if (listp (car marks)) | 486 | (marks (car marks)) |
| 476 | (car marks) | 487 | (marks (if (listp (car marks)) (car marks) marks))) |
| 477 | marks)))) | 488 | marks))) |
| 489 | |||
| 490 | (defun spam-group-spam-marks (group) | ||
| 491 | (spam-group-ham-marks group t)) | ||
| 478 | 492 | ||
| 479 | (defun spam-group-spam-contents-p (group) | 493 | (defun spam-group-spam-contents-p (group) |
| 480 | (if (stringp group) | 494 | (if (stringp group) |
| @@ -1036,12 +1050,23 @@ functions") | |||
| 1036 | (nth 2 flist)))) | 1050 | (nth 2 flist)))) |
| 1037 | 1051 | ||
| 1038 | (defun spam-list-articles (articles classification) | 1052 | (defun spam-list-articles (articles classification) |
| 1039 | (let ((marks (mapcar 'eval (spam-group-ham-marks gnus-newsgroup-name | 1053 | (let ((mark-check (if (eq classification 'spam) |
| 1040 | (eq classification 'spam)))) | 1054 | 'spam-group-spam-mark-p |
| 1041 | list) | 1055 | 'spam-group-ham-mark-p)) |
| 1056 | list mark-cache-yes mark-cache-no) | ||
| 1042 | (dolist (article articles) | 1057 | (dolist (article articles) |
| 1043 | (if (memq (gnus-summary-article-mark article) marks) | 1058 | (let ((mark (gnus-summary-article-mark article))) |
| 1044 | (push article list))) | 1059 | (unless (memq mark mark-cache-no) |
| 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)))))) | ||
| 1045 | list)) | 1070 | list)) |
| 1046 | 1071 | ||
| 1047 | (defun spam-register-routine (classification | 1072 | (defun spam-register-routine (classification |