Implement new variable news-group-keep-ignored-headers. Change
authorChris Hanson <org/chris-hanson/cph>
Thu, 19 Dec 1996 04:50:07 +0000 (04:50 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 19 Dec 1996 04:50:07 +0000 (04:50 +0000)
purging code to use new interface.

v7/src/edwin/edwin.pkg
v7/src/edwin/snr.scm

index c7d6a03cac6fd221204e62f857f30e9203e86753..e1239da0a21d6b2350d633de3911364f9ea5fc4e 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: edwin.pkg,v 1.202 1996/12/10 22:49:58 cph Exp $
+$Id: edwin.pkg,v 1.203 1996/12/19 04:50:07 cph Exp $
 
 Copyright (c) 1989-96 Massachusetts Institute of Technology
 
@@ -1704,6 +1704,7 @@ MIT in each case. |#
          edwin-variable$news-group-author-column
          edwin-variable$news-group-ignore-hidden-subjects
          edwin-variable$news-group-ignored-subject-retention
+         edwin-variable$news-group-keep-ignored-headers
          edwin-variable$news-group-keep-seen-headers
          edwin-variable$news-group-mode-hook
          edwin-variable$news-group-show-author-name
index 8ef0c6a19e546d2620124d310e6a2d46dfa267e6..1afed99ae1df4f1cc1a4372b99e060c1d8cdb898 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: snr.scm,v 1.22 1996/12/07 07:32:57 cph Exp $
+;;;    $Id: snr.scm,v 1.23 1996/12/19 04:50:00 cph Exp $
 ;;;
 ;;;    Copyright (c) 1995-96 Massachusetts Institute of Technology
 ;;;
@@ -223,6 +223,13 @@ Otherwise, only unseen headers are kept."
   #t
   boolean?)
 
+(define-variable news-group-keep-ignored-headers
+  "Switch controlling which headers are kept in the off-line database.
+If true, all headers are kept.
+Otherwise (the default), ignored headers aren't kept."
+  #f
+  boolean?)
+
 (define-variable news-group-show-seen-headers
   "Switch controlling whether already-seen headers are shown.
 If true, group buffers show all headers.
@@ -3748,14 +3755,14 @@ With prefix arg, replaces the file with the list information."
     (news-group:purge-header-cache group 'ALL)
     (news-group:purge-pre-read-headers group
       (if (ref-variable news-group-keep-seen-headers buffer)
-         (lambda (number body?)
-           body?
-           (or (< number (news-group:first-article group))
-               (> number (news-group:last-article group))))
-         (let ((ranges (news-group:guarantee-ranges-seen group)))
-           (lambda (number body?)
-             body?
-             (member-of-ranges? ranges number)))))
+         (lambda (header)
+           (let ((number (news-header:number header)))
+             (or (< number (news-group:first-article group))
+                 (> number (news-group:last-article group))
+                 (and (not (ref-variable news-group-keep-ignored-headers
+                                         buffer))
+                      (news-header:ignore? header)))))
+         news-header:article-seen?))
     (message msg "done")))
 
 (define (news-group:number-of-articles group)