* gnus-sum.el: Concur with Steve Young, 5th argument to 'load' is
authorKevin Greiner <kevin.greiner@compsol.cc>
Wed, 9 Apr 2003 13:24:43 +0000 (13:24 +0000)
committerKevin Greiner <kevin.greiner@compsol.cc>
Wed, 9 Apr 2003 13:24:43 +0000 (13:24 +0000)
non-essential.  Removed on all platforms.
(gnus-select-newsgroup): When the agent is active, expand the
group's active range to include fetched articles that are no
longer in the server's active range.

lisp/gnus-sum.el

index 93e3e9b..7c4cc27 100644 (file)
@@ -1395,9 +1395,7 @@ buffers. For example:
     ;; source file.
     (if (boundp 'gnus-newsgroup-variables)
         nil
-      (if (featurep 'xemacs)
-         (load "gnus-sum.el" t t t)
-       (load "gnus-sum.el" t t t t)))
+      (load "gnus-sum.el" t t t))
     (require 'gnus)
     (require 'gnus-agent)
     (require 'gnus-art)))
@@ -4998,6 +4996,18 @@ If SELECT-ARTICLES, only select those articles from GROUP."
       (error "Couldn't request group %s: %s"
             group (gnus-status-message group)))
 
+    (when gnus-agent
+      ;; The agent may be storing articles that are no longer in the
+      ;; server's active range.  If that is the case, the active range
+      ;; needs to be expanded such that the agent's articles can be
+      ;; included in the summary.
+      (let* ((gnus-command-method (gnus-find-method-for-group group))
+             (alist (gnus-agent-load-alist group))
+             (active (gnus-active group)))
+        (if (and (car alist)
+                 (< (caar alist) (car active)))
+            (gnus-set-active group (cons (caar alist) (cdr active))))))
+
     (setq gnus-newsgroup-name group
          gnus-newsgroup-unselected nil
          gnus-newsgroup-unreads (gnus-list-of-unread-articles group))