Mercurial > emacs
diff lisp/gnus/gnus-dup.el @ 31716:9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 19 Sep 2000 13:37:09 +0000 |
parents | 15fc6acbae7a |
children | 695cf19ef79e d7ddb3e565de |
line wrap: on
line diff
--- a/lisp/gnus/gnus-dup.el Tue Sep 19 13:28:27 2000 +0000 +++ b/lisp/gnus/gnus-dup.el Tue Sep 19 13:37:09 2000 +0000 @@ -1,5 +1,6 @@ ;;; gnus-dup.el --- suppression of duplicate articles in Gnus -;; Copyright (C) 1996,97,98 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 1998, 1999, 2000 +;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -32,8 +33,6 @@ (eval-when-compile (require 'cl)) -(eval-when-compile (require 'cl)) - (require 'gnus) (require 'gnus-art) @@ -100,7 +99,7 @@ "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)) @@ -138,6 +137,8 @@ (gnus-dup-open)) (gnus-message 6 "Suppressing duplicates...") (let ((headers gnus-newsgroup-headers) + (auto (and gnus-newsgroup-auto-expire + (memq gnus-duplicate-mark gnus-auto-expirable-marks))) number header) (while (setq header (pop headers)) (when (and (intern-soft (mail-header-id header) gnus-dup-hashtb) @@ -145,8 +146,10 @@ (setq gnus-newsgroup-unreads (delq (setq number (mail-header-number header)) gnus-newsgroup-unreads)) - (push (cons number gnus-duplicate-mark) - gnus-newsgroup-reads)))) + (if (not auto) + (push (cons number gnus-duplicate-mark) gnus-newsgroup-reads) + (push number gnus-newsgroup-expirable) + (push (cons number gnus-expirable-mark) gnus-newsgroup-reads))))) (gnus-message 6 "Suppressing duplicates...done")) (defun gnus-dup-unsuppress-article (article)