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-sum.el, v [EMACS_22_BASE]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/gnus-sum.el, v [EMACS_22_BASE]
Date: Tue, 09 Oct 2007 08:56:00 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Miles Bader <miles>     07/10/09 08:55:59

Index: lisp/gnus/gnus-sum.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-sum.el,v
retrieving revision 1.100.2.4
retrieving revision 1.100.2.5
diff -u -b -r1.100.2.4 -r1.100.2.5
--- lisp/gnus/gnus-sum.el       21 Aug 2007 04:52:21 -0000      1.100.2.4
+++ lisp/gnus/gnus-sum.el       9 Oct 2007 08:55:57 -0000       1.100.2.5
@@ -1029,6 +1029,17 @@
   :type '(repeat symbol)
   :group 'gnus-charset)
 
+(defcustom gnus-newsgroup-maximum-articles nil
+  "The maximum number of articles a newsgroup.
+If this is a number, old articles in a newsgroup exceeding this number
+are silently ignored.  If it is nil, no article is ignored.  Note that
+setting this variable to a number might prevent you from reading very
+old articles."
+  :group 'gnus-group-select
+  :version "22.2"
+  :type '(choice (const :tag "No limit" nil)
+                integer))
+
 (gnus-define-group-parameter
  ignored-charsets
  :type list
@@ -5472,11 +5483,13 @@
              ;; articles in the group, or (if that's nil), the
              ;; articles in the cache.
              (or
-              (if gnus-maximum-newsgroup
+              (if gnus-newsgroup-maximum-articles
                   (let ((active (gnus-active group)))
                     (gnus-uncompress-range
                      (cons (max (car active)
-                                (- (cdr active) gnus-maximum-newsgroup -1))
+                                (- (cdr active)
+                                   gnus-newsgroup-maximum-articles
+                                   -1))
                            (cdr active))))
                 (gnus-uncompress-range (gnus-active group)))
               (gnus-cache-articles-in-group group))
@@ -6540,8 +6553,9 @@
   (let* ((read (gnus-info-read (gnus-get-info group)))
         (active (or (gnus-active group) (gnus-activate-group group)))
         (last (cdr active))
-        (bottom (if gnus-maximum-newsgroup
-                    (max (car active) (- last gnus-maximum-newsgroup -1))
+        (bottom (if gnus-newsgroup-maximum-articles
+                    (max (car active)
+                         (- last gnus-newsgroup-maximum-articles -1))
                   (car active)))
         first nlast unread)
     ;; If none are read, then all are unread.
@@ -6585,9 +6599,11 @@
          (gnus-list-range-difference
           (gnus-sorted-complement
            (gnus-uncompress-range
-            (if gnus-maximum-newsgroup
+            (if gnus-newsgroup-maximum-articles
                 (cons (max (car active)
-                           (- (cdr active) gnus-maximum-newsgroup -1))
+                           (- (cdr active)
+                              gnus-newsgroup-maximum-articles
+                              -1))
                       (cdr active))
               active))
            (gnus-list-of-unread-articles group))
@@ -6601,8 +6617,9 @@
   (let* ((read (gnus-info-read (gnus-get-info group)))
         (active (or (gnus-active group) (gnus-activate-group group)))
         (last (cdr active))
-        (bottom (if gnus-maximum-newsgroup
-                    (max (car active) (- last gnus-maximum-newsgroup -1))
+        (bottom (if gnus-newsgroup-maximum-articles
+                    (max (car active)
+                         (- last gnus-newsgroup-maximum-articles -1))
                   (car active)))
         first nlast unread)
     ;; If none are read, then all are unread.




reply via email to

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