comparison lisp/gnus/gnus-dup.el @ 30:ec9a17fef872 r19-15b98

Import from CVS: tag r19-15b98
author cvs
date Mon, 13 Aug 2007 08:52:29 +0200
parents d95e72db5c07
children
comparison
equal deleted inserted replaced
29:7976500f47f9 30:ec9a17fef872
81 (setq gnus-dup-list nil)) 81 (setq gnus-dup-list nil))
82 (setq gnus-dup-hashtb (gnus-make-hashtable gnus-duplicate-list-length)) 82 (setq gnus-dup-hashtb (gnus-make-hashtable gnus-duplicate-list-length))
83 ;; Enter all Message-IDs into the hash table. 83 ;; Enter all Message-IDs into the hash table.
84 (let ((list gnus-dup-list) 84 (let ((list gnus-dup-list)
85 (obarray gnus-dup-hashtb)) 85 (obarray gnus-dup-hashtb))
86 (while list 86 (while list
87 (intern (pop list))))) 87 (intern (pop list)))))
88 88
89 (defun gnus-dup-read () 89 (defun gnus-dup-read ()
90 "Read the duplicate suppression list." 90 "Read the duplicate suppression list."
91 (setq gnus-dup-list nil) 91 (setq gnus-dup-list nil)
123 (not (intern-soft msgid gnus-dup-hashtb))) 123 (not (intern-soft msgid gnus-dup-hashtb)))
124 (push msgid gnus-dup-list) 124 (push msgid gnus-dup-list)
125 (intern msgid gnus-dup-hashtb)))) 125 (intern msgid gnus-dup-hashtb))))
126 ;; Chop off excess Message-IDs from the list. 126 ;; Chop off excess Message-IDs from the list.
127 (let ((end (nthcdr gnus-duplicate-list-length gnus-dup-list))) 127 (let ((end (nthcdr gnus-duplicate-list-length gnus-dup-list)))
128 (when end 128 (when end
129 (setcdr end nil)))) 129 (setcdr end nil))))
130 130
131 (defun gnus-dup-suppress-articles () 131 (defun gnus-dup-suppress-articles ()
132 "Mark duplicate articles as read." 132 "Mark duplicate articles as read."
133 (unless gnus-dup-list 133 (unless gnus-dup-list
136 (let ((headers gnus-newsgroup-headers) 136 (let ((headers gnus-newsgroup-headers)
137 number header) 137 number header)
138 (while (setq header (pop headers)) 138 (while (setq header (pop headers))
139 (when (and (intern-soft (mail-header-id header) gnus-dup-hashtb) 139 (when (and (intern-soft (mail-header-id header) gnus-dup-hashtb)
140 (gnus-summary-article-unread-p (mail-header-number header))) 140 (gnus-summary-article-unread-p (mail-header-number header)))
141 (setq gnus-newsgroup-unreads 141 (setq gnus-newsgroup-unreads
142 (delq (setq number (mail-header-number header)) 142 (delq (setq number (mail-header-number header))
143 gnus-newsgroup-unreads)) 143 gnus-newsgroup-unreads))
144 (push (cons number gnus-duplicate-mark) 144 (push (cons number gnus-duplicate-mark)
145 gnus-newsgroup-reads)))) 145 gnus-newsgroup-reads))))
146 (gnus-message 6 "Suppressing duplicates...done")) 146 (gnus-message 6 "Suppressing duplicates...done"))