From: Chris Hanson Date: Thu, 19 Dec 1996 04:50:07 +0000 (+0000) Subject: Implement new variable news-group-keep-ignored-headers. Change X-Git-Tag: 20090517-FFI~5295 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=72bc1fd120f0705e372dd7ac540db056002ec7b6;p=mit-scheme.git Implement new variable news-group-keep-ignored-headers. Change purging code to use new interface. --- diff --git a/v7/src/edwin/edwin.pkg b/v7/src/edwin/edwin.pkg index c7d6a03ca..e1239da0a 100644 --- a/v7/src/edwin/edwin.pkg +++ b/v7/src/edwin/edwin.pkg @@ -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 diff --git a/v7/src/edwin/snr.scm b/v7/src/edwin/snr.scm index 8ef0c6a19..1afed99ae 100644 --- a/v7/src/edwin/snr.scm +++ b/v7/src/edwin/snr.scm @@ -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)