(gnus-get-unread-articles): Don't prevent from checking foreign groups unless
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 21 Nov 2007 09:35:04 +0000 (09:35 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 21 Nov 2007 09:35:04 +0000 (09:35 +0000)
 a group level is specified by a user.  Reported by Dan Nicolaescu.

lisp/ChangeLog
lisp/gnus-start.el

index 070b486..736335f 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-start.el (gnus-get-unread-articles): Don't prevent from checking
+       foreign groups unless a group level is specified by a user.
+       Reported by Dan Nicolaescu <dann@ics.uci.edu>.
+
 2007-11-15  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * nntp.el (nntp-insert-buffer-substring, nntp-copy-to-buffer): New
index 4546252..3075573 100644 (file)
@@ -1670,7 +1670,7 @@ If SCAN, request a scan of that group as well."
 (defun gnus-get-unread-articles (&optional level)
   (setq gnus-server-method-cache nil)
   (let* ((newsrc (cdr gnus-newsrc-alist))
-        (level (or level gnus-activate-level (1+ gnus-level-subscribed)))
+        (alevel (or level gnus-activate-level (1+ gnus-level-subscribed)))
         (foreign-level
          (min
           (cond ((and gnus-activate-foreign-newsgroups
@@ -1679,11 +1679,11 @@ If SCAN, request a scan of that group as well."
                 ((numberp gnus-activate-foreign-newsgroups)
                  gnus-activate-foreign-newsgroups)
                 (t 0))
-          level))
+          alevel))
         (methods-cache nil)
         (type-cache nil)
         scanned-methods info group active method retrieve-groups cmethod
-        method-type ignore)
+        method-type)
     (gnus-message 6 "Checking new news...")
 
     (while newsrc
@@ -1720,7 +1720,6 @@ If SCAN, request a scan of that group as well."
                'foreign)))
        (push (cons method method-type) type-cache))
 
-      (setq ignore nil)
       (cond ((and method (eq method-type 'foreign))
             ;; These groups are foreign.  Check the level.
             (if (<= (gnus-info-level info) foreign-level)
@@ -1734,9 +1733,12 @@ If SCAN, request a scan of that group as well."
                   (when (fboundp (intern (concat (symbol-name (car method))
                                                  "-request-update-info")))
                     (inline (gnus-request-update-info info method))))
-              (setq ignore t)))
+              (if (and level (> (gnus-info-level info) level))
+                  ;; Don't check groups of which levels are higher
+                  ;; than the one that a user specified.
+                  (setq active 'ignore))))
            ;; These groups are native or secondary.
-           ((> (gnus-info-level info) level)
+           ((> (gnus-info-level info) alevel)
             ;; We don't want these groups.
             (setq active 'ignore))
            ;; Activate groups.
@@ -1773,10 +1775,6 @@ If SCAN, request a scan of that group as well."
        ((eq active 'ignore)
        ;; Don't do anything.
        )
-       ((and active ignore)
-       ;; The level of the foreign group is higher than the specified
-       ;; value.
-       )
        (active
        (inline (gnus-get-unread-articles-in-group info active t)))
        (t