emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-dup.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/gnus-dup.el,v
Date: Sun, 28 Oct 2007 09:19:07 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     07/10/28 09:18:40

Index: lisp/gnus/gnus-dup.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-dup.el,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- lisp/gnus/gnus-dup.el       26 Jul 2007 05:26:57 -0000      1.12
+++ lisp/gnus/gnus-dup.el       28 Oct 2007 09:18:29 -0000      1.13
@@ -85,10 +85,8 @@
     (setq gnus-dup-list nil))
   (setq gnus-dup-hashtb (gnus-make-hashtable gnus-duplicate-list-length))
   ;; Enter all Message-IDs into the hash table.
-  (let ((list gnus-dup-list)
-       (obarray gnus-dup-hashtb))
-    (while list
-      (intern (pop list)))))
+  (let ((obarray gnus-dup-hashtb))
+    (mapc 'intern gnus-dup-list)))
 
 (defun gnus-dup-read ()
   "Read the duplicate suppression list."
@@ -113,11 +111,10 @@
   (unless gnus-dup-list
     (gnus-dup-open))
   (setq gnus-dup-list-dirty t)         ; mark list for saving
-  (let ((data gnus-newsgroup-data)
-       datum msgid)
+  (let (msgid)
     ;; Enter the Message-IDs of all read articles into the list
     ;; and hash table.
-    (while (setq datum (pop data))
+    (dolist (datum gnus-newsgroup-data)
       (when (and (not (gnus-data-pseudo-p datum))
                 (> (gnus-data-number datum) 0)
                 (not (memq (gnus-data-number datum) gnus-newsgroup-unreads))
@@ -130,6 +127,7 @@
   ;; Chop off excess Message-IDs from the list.
   (let ((end (nthcdr gnus-duplicate-list-length gnus-dup-list)))
     (when end
+      (mapc (lambda (id) (unintern id gnus-dup-hashtb)) (cdr end))
       (setcdr end nil))))
 
 (defun gnus-dup-suppress-articles ()
@@ -137,11 +135,10 @@
   (unless gnus-dup-list
     (gnus-dup-open))
   (gnus-message 6 "Suppressing duplicates...")
-  (let ((headers gnus-newsgroup-headers)
-       (auto (and gnus-newsgroup-auto-expire
+  (let ((auto (and gnus-newsgroup-auto-expire
                   (memq gnus-duplicate-mark gnus-auto-expirable-marks)))
-       number header)
-    (while (setq header (pop headers))
+       number)
+    (dolist (header gnus-newsgroup-headers)
       (when (and (intern-soft (mail-header-id header) gnus-dup-hashtb)
                 (gnus-summary-article-unread-p (mail-header-number header)))
        (setq gnus-newsgroup-unreads
@@ -155,7 +152,8 @@
 
 (defun gnus-dup-unsuppress-article (article)
   "Stop suppression of ARTICLE."
-  (let ((id (mail-header-id (gnus-data-header (gnus-data-find article)))))
+  (let* ((header (gnus-data-header (gnus-data-find article)))
+        (id     (when header (mail-header-id header))))
     (when id
       (setq gnus-dup-list-dirty t)
       (setq gnus-dup-list (delete id gnus-dup-list))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]