*** empty log message ***
[gnus] / lisp / gnus-dup.el
index fe6b5d1..691381f 100644 (file)
@@ -1,7 +1,7 @@
 ;;; gnus-dup.el --- suppression of duplicate articles in Gnus
-;; Copyright (C) 1996,97 Free Software Foundation, Inc.
+;; Copyright (C) 1996,97,98,99 Free Software Foundation, Inc.
 
-;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
 
 ;; This file is part of GNU Emacs.
@@ -30,6 +30,8 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
+
 (require 'gnus)
 (require 'gnus-art)
 
@@ -96,7 +98,7 @@ seen in the same session."
   "Save the duplicate suppression list."
   (when (and gnus-save-duplicate-list
             gnus-dup-list-dirty)
-    (nnheader-temp-write gnus-duplicate-file
+    (with-temp-file gnus-duplicate-file
       (gnus-prin1 `(setq gnus-dup-list ',gnus-dup-list))))
   (setq gnus-dup-list-dirty nil))
 
@@ -116,7 +118,7 @@ seen in the same session."
     (while (setq datum (pop data))
       (when (and (not (gnus-data-pseudo-p datum))
                 (> (gnus-data-number datum) 0)
-                (gnus-data-read-p datum)
+                (not (memq (gnus-data-number datum) gnus-newsgroup-unreads))
                 (not (= (gnus-data-mark datum) gnus-canceled-mark))
                 (setq msgid (mail-header-id (gnus-data-header datum)))
                 (not (nnheader-fake-message-id-p msgid))