From: Chris Hanson Date: Wed, 25 Dec 1996 07:20:15 +0000 (+0000) Subject: * Change terminology to refer to "seen" articles as "deleted". X-Git-Tag: 20090517-FFI~5289 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=dacbd4ea5111e1afe9c4b1ff743a08984c2d8402;p=mit-scheme.git * Change terminology to refer to "seen" articles as "deleted". * Introduce new marking, "browsed", to indicate articles whose headers have been shown in a news-group buffer. These "browsed" markings are used to prevent a common problem with cross posts: after having marked an article in one group, re-marking the cross-posted article differently in another group clobbers the original markings. The news reader now examines the "browsed" marking, and does not re-mark any cross post that has already been "browsed". * Change code that selects initial header when opening a news-group buffer for the first time. New code does not automatically expand a thread whose first message is "deleted". --- diff --git a/v7/src/edwin/snr.scm b/v7/src/edwin/snr.scm index 3ebf592c5..f9fad8d2f 100644 --- a/v7/src/edwin/snr.scm +++ b/v7/src/edwin/snr.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: snr.scm,v 1.25 1996/12/25 06:50:07 cph Exp $ +;;; $Id: snr.scm,v 1.26 1996/12/25 07:20:15 cph Exp $ ;;; ;;; Copyright (c) 1995-96 Massachusetts Institute of Technology ;;; @@ -4012,62 +4012,6 @@ With prefix arg, replaces the file with the list information." (set-news-group:ranges-deleted! group ranges) ranges)) -(define ((range-predicate group-ranges) header) - (member-of-ranges? (group-ranges (news-header:group header)) - (news-header:number header))) - -(define news-header:article-deleted? - (range-predicate news-group:ranges-deleted)) - -(define news-header:article-marked? - (range-predicate news-group:ranges-marked)) - -(define (news-group:article-browsed? group number) - (member-of-ranges? (news-group:ranges-browsed group) number)) - -(define (ranges-marker group-ranges set-group-ranges! handle-xrefs? procedure) - (news-group:adjust-article-status! handle-xrefs? - (lambda (group number) - (set-group-ranges! group (procedure (group-ranges group) number))))) - -(define (ranges-deleted-marker procedure) - (let ((marker - (ranges-marker news-group:ranges-deleted - set-news-group:ranges-deleted! - #t - procedure))) - (lambda (header buffer) - (news-group:article-unmarked! header buffer) - (marker header buffer)))) - -(define news-group:article-deleted! - (ranges-deleted-marker add-to-ranges!)) - -(define news-group:article-not-deleted! - (ranges-deleted-marker remove-from-ranges!)) - -(define news-group:article-marked! - (let ((marker - (ranges-marker news-group:ranges-marked - set-news-group:ranges-marked! - #t - add-to-ranges!))) - (lambda (header buffer) - (news-group:article-not-deleted! header buffer) - (marker header buffer)))) - -(define news-group:article-unmarked! - (ranges-marker news-group:ranges-marked - set-news-group:ranges-marked! - #t - remove-from-ranges!)) - -(define news-group:article-browsed! - (ranges-marker news-group:ranges-browsed - set-news-group:ranges-browsed! - #f - add-to-ranges!)) - (define ((news-group:adjust-article-status! handle-xrefs? procedure) header buffer) (let ((do-it @@ -4127,6 +4071,62 @@ With prefix arg, replaces the file with the list information." ((news-group:< t2 t1) 'GREATER) (else 'EQUAL))) +(define ((range-predicate group-ranges) header) + (member-of-ranges? (group-ranges (news-header:group header)) + (news-header:number header))) + +(define news-header:article-deleted? + (range-predicate news-group:ranges-deleted)) + +(define news-header:article-marked? + (range-predicate news-group:ranges-marked)) + +(define (news-group:article-browsed? group number) + (member-of-ranges? (news-group:ranges-browsed group) number)) + +(define (ranges-marker group-ranges set-group-ranges! handle-xrefs? procedure) + (news-group:adjust-article-status! handle-xrefs? + (lambda (group number) + (set-group-ranges! group (procedure (group-ranges group) number))))) + +(define (ranges-deleted-marker procedure) + (let ((marker + (ranges-marker news-group:ranges-deleted + set-news-group:ranges-deleted! + #t + procedure))) + (lambda (header buffer) + (news-group:article-unmarked! header buffer) + (marker header buffer)))) + +(define news-group:article-deleted! + (ranges-deleted-marker add-to-ranges!)) + +(define news-group:article-not-deleted! + (ranges-deleted-marker remove-from-ranges!)) + +(define news-group:article-marked! + (let ((marker + (ranges-marker news-group:ranges-marked + set-news-group:ranges-marked! + #t + add-to-ranges!))) + (lambda (header buffer) + (news-group:article-not-deleted! header buffer) + (marker header buffer)))) + +(define news-group:article-unmarked! + (ranges-marker news-group:ranges-marked + set-news-group:ranges-marked! + #t + remove-from-ranges!)) + +(define news-group:article-browsed! + (ranges-marker news-group:ranges-browsed + set-news-group:ranges-browsed! + #f + add-to-ranges!)) + ;;;; Ignored-Subjects Database (define (news-header:ignore?! header table t)