Make sure that all article ranges are clipped when the group is
authorChris Hanson <org/chris-hanson/cph>
Wed, 18 Jun 1997 07:05:46 +0000 (07:05 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 18 Jun 1997 07:05:46 +0000 (07:05 +0000)
updated.

v7/src/edwin/snr.scm

index dc16aa2244d8ae62a76a3f3617a9db9f53e68c32..a3a50dcd84b655edd9b8fd2fc7f34c80a84e2da6 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: snr.scm,v 1.35 1997/06/14 07:34:04 cph Exp $
+;;;    $Id: snr.scm,v 1.36 1997/06/18 07:05:46 cph Exp $
 ;;;
 ;;;    Copyright (c) 1995-97 Massachusetts Institute of Technology
 ;;;
@@ -4057,7 +4057,7 @@ With prefix arg, replaces the file with the list information."
     (news-group:update-server-info! group)
     (message msg "done"))
   (if (news-group:active? group)
-      (news-group:guarantee-ranges-deleted group)))
+      (news-group:clip-ranges! group)))
 
 (define (news-group:purge-and-compact-headers! group buffer)
   (let ((msg
@@ -4080,7 +4080,7 @@ With prefix arg, replaces the file with the list information."
          news-header:article-deleted?))
     (news-group:close-database group)
     (message msg "done")))
-
+\f
 (define (news-group:number-of-articles group)
   (let ((estimate (news-group:estimated-n-articles group)))
     (and estimate
@@ -4096,6 +4096,24 @@ With prefix arg, replaces the file with the list information."
                      n-seen)))
             estimate))))
 
+(define (news-group:clip-ranges! group)
+  (if (news-group:server-has-articles? group)
+      (let ((first (news-group:first-article group))
+           (last (news-group:last-article group)))
+       (set-news-group:ranges-deleted!
+        group
+        (clip-ranges! (news-group:ranges-deleted group) first last))
+       (set-news-group:ranges-marked!
+        group
+        (clip-ranges! (news-group:ranges-marked group) first last))
+       (set-news-group:ranges-browsed!
+        group
+        (clip-ranges! (news-group:ranges-browsed group) first last)))
+      (begin
+       (set-news-group:ranges-deleted! group '())
+       (set-news-group:ranges-marked! group '())
+       (set-news-group:ranges-browsed! group '()))))
+
 (define (news-group:guarantee-ranges-deleted group)
   (let ((ranges
         (if (news-group:server-has-articles? group)