Mercurial > emacs
comparison lisp/gnus/nnimap.el @ 69625:17473f7e626b
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-170
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 62-64)
- Merge from emacs--devo--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 21 Mar 2006 20:37:02 +0000 |
parents | 12d289b6e5de |
children | 21f28d10d73a e6bf73e43cf4 |
comparison
equal
deleted
inserted
replaced
69624:efd1add5bedf | 69625:17473f7e626b |
---|---|
1125 | 1125 |
1126 (when (nnimap-mark-permanent-p 'read) | 1126 (when (nnimap-mark-permanent-p 'read) |
1127 (let (seen unseen) | 1127 (let (seen unseen) |
1128 ;; read info could contain articles marked unread by other | 1128 ;; read info could contain articles marked unread by other |
1129 ;; imap clients! we correct this | 1129 ;; imap clients! we correct this |
1130 (setq seen (gnus-uncompress-range (gnus-info-read info)) | 1130 (setq unseen (gnus-compress-sequence |
1131 unseen (imap-search "UNSEEN UNDELETED") | 1131 (imap-search "UNSEEN UNDELETED")) |
1132 seen (gnus-set-difference seen unseen) | 1132 seen (gnus-range-difference (gnus-info-read info) unseen) |
1133 ;; seen might lack articles marked as read by other | 1133 seen (gnus-range-add seen |
1134 ;; imap clients! we correct this | 1134 (gnus-compress-sequence |
1135 seen (append seen (imap-search "SEEN")) | 1135 (imap-search "SEEN"))) |
1136 ;; remove dupes | |
1137 seen (sort seen '<) | |
1138 seen (gnus-compress-sequence seen t) | |
1139 ;; we can't return '(1) since this isn't a "list of ranges", | |
1140 ;; and we can't return '((1)) since g-list-of-unread-articles | |
1141 ;; is buggy so we return '((1 . 1)). | |
1142 seen (if (and (integerp (car seen)) | 1136 seen (if (and (integerp (car seen)) |
1143 (null (cdr seen))) | 1137 (null (cdr seen))) |
1144 (list (cons (car seen) (car seen))) | 1138 (list (cons (car seen) (car seen))) |
1145 seen)) | 1139 seen)) |
1146 (gnus-info-set-read info seen))) | 1140 (gnus-info-set-read info seen))) |