From: yamaoka Date: Sat, 4 Dec 2004 03:43:40 +0000 (+0000) Subject: Synch to No Gnus 200412031558. X-Git-Tag: t-gnus-6_17_4-quimby-~647 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0530ab21ca1d9eaa820a72095ba3cd7e685e70ef;p=elisp%2Fgnus.git- Synch to No Gnus 200412031558. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af162aa..6a9b2cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-03 Reiner Steib + + * gnus-sum.el (gnus-summary-limit-to-recipient): Implement + not-matching option. + 2004-12-02 Reiner Steib * gnus-sum.el (gnus-summary-limit-to-recipient): New function. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 0fa4cfc..74f59dc 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -7700,6 +7700,8 @@ If NOT-MATCHING, excluding articles that have authors that match a regexp." (defun gnus-summary-limit-to-recipient (recipient &optional not-matching) "Limit the summary buffer to articles with the given RECIPIENT. +If NOT-MATCHING, exclude RECIPIENT. + To and Cc headers are checked. You need to include them in `nnmail-extra-headers'." ;; Unlike `rmail-summary-by-recipients', doesn't include From. @@ -7708,7 +7710,7 @@ To and Cc headers are checked. You need to include them in (if current-prefix-arg "Exclude" "Limit to"))) current-prefix-arg)) (when (not (equal "" recipient)) - (prog1 (let* ((articles1 + (prog1 (let* ((to (if (memq 'To nnmail-extra-headers) (gnus-summary-find-matching (cons 'extra 'To) recipient 'all nil nil @@ -7717,7 +7719,7 @@ To and Cc headers are checked. You need to include them in 1 "`To' isn't present in `nnmail-extra-headers'") (sit-for 1) nil)) - (articles2 + (cc (if (memq 'Cc nnmail-extra-headers) (gnus-summary-find-matching (cons 'extra 'Cc) recipient 'all nil nil @@ -7726,7 +7728,13 @@ To and Cc headers are checked. You need to include them in 1 "`Cc' isn't present in `nnmail-extra-headers'") (sit-for 1) nil)) - (articles (nconc articles1 articles2))) + (articles + (if not-matching + ;; We need the numbers that are in both lists: + (mapcar (lambda (a) + (and (memq a to) a)) + cc) + (nconc to cc)))) (unless articles (error "Found no matches for \"%s\"" recipient)) (gnus-summary-limit articles))