* nntp.el (nntp-request-update-info): Return nil if nntp-marks-is-evil is true
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 15 Nov 2004 05:31:51 +0000 (05:31 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 15 Nov 2004 05:31:51 +0000 (05:31 +0000)
 so that gnus-get-unread-articles-in-group may not call gnus-activate-group
 which uselessly issues the GROUP commands for all nntp groups and wastes time.
 Reported by Romain Francoise.

* gnus-start.el (gnus-get-unread-articles): Remove redundant test.

lisp/ChangeLog
lisp/gnus-start.el
lisp/nntp.el

index 2285eb6..49241a9 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-15  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nntp.el (nntp-request-update-info): Return nil if
+       nntp-marks-is-evil is true so that gnus-get-unread-articles-in-group
+       may not call gnus-activate-group which uselessly issues the GROUP
+       commands for all nntp groups and wastes time.  Reported by Romain
+       Francoise <romain@orebokech.com>.
+
+       * gnus-start.el (gnus-get-unread-articles): Remove redundant test.
+
 2004-11-15  Simon Josefsson  <jas@extundo.com>
 
        * gnus-art.el (gnus-header-button-alist): Handle URLs in OpenPGP:
index 7edace2..c158c7b 100644 (file)
@@ -1688,8 +1688,7 @@ If SCAN, request a scan of that group as well."
       (cond ((and method (eq method-type 'foreign))
             ;; These groups are foreign.  Check the level.
             (if (<= (gnus-info-level info) foreign-level)
-                (when (and (<= (gnus-info-level info) foreign-level)
-                           (setq active (gnus-activate-group group 'scan)))
+                (when (setq active (gnus-activate-group group 'scan))
                   ;; Let the Gnus agent save the active file.
                   (when (and gnus-agent active (gnus-online method))
                     (gnus-agent-save-group-info
index e3d240a..7646676 100644 (file)
@@ -1052,29 +1052,29 @@ command whose response triggered the error."
 
 (deffoo nntp-request-update-info (group info &optional server)
   (unless nntp-marks-is-evil
-    (nntp-possibly-create-directory group server))
-  (when (and (not nntp-marks-is-evil) (nntp-marks-changed-p group server))
-    (nnheader-message 8 "Updating marks for %s..." group)
-    (nntp-open-marks group server)
-    ;; Update info using `nntp-marks'.
-    (mapc (lambda (pred)
-           (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists)
-             (gnus-info-set-marks
-              info
-              (gnus-update-alist-soft
-               (cdr pred)
-               (cdr (assq (cdr pred) nntp-marks))
-               (gnus-info-marks info))
-              t)))
-         gnus-article-mark-lists)
-    (let ((seen (cdr (assq 'read nntp-marks))))
-      (gnus-info-set-read info
-                         (if (and (integerp (car seen))
-                                  (null (cdr seen)))
-                             (list (cons (car seen) (car seen)))
-                           seen)))
-    (nnheader-message 8 "Updating marks for %s...done" group))
-  info)
+    (nntp-possibly-create-directory group server)
+    (when (nntp-marks-changed-p group server)
+      (nnheader-message 8 "Updating marks for %s..." group)
+      (nntp-open-marks group server)
+      ;; Update info using `nntp-marks'.
+      (mapc (lambda (pred)
+             (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists)
+               (gnus-info-set-marks
+                info
+                (gnus-update-alist-soft
+                 (cdr pred)
+                 (cdr (assq (cdr pred) nntp-marks))
+                 (gnus-info-marks info))
+                t)))
+           gnus-article-mark-lists)
+      (let ((seen (cdr (assq 'read nntp-marks))))
+       (gnus-info-set-read info
+                           (if (and (integerp (car seen))
+                                    (null (cdr seen)))
+                               (list (cons (car seen) (car seen)))
+                             seen)))
+      (nnheader-message 8 "Updating marks for %s...done" group))
+    info))