(gnus-group-mark-article-read): Keep `gnus-newsgroup-unselected' sorted.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 30 May 2011 21:24:45 +0000 (23:24 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 30 May 2011 21:24:45 +0000 (23:24 +0200)
If this isn't done, then unselected articles may be marked as read.

lisp/ChangeLog
lisp/gnus-group.el

index b606f09..b02d9c5 100644 (file)
@@ -1,5 +1,9 @@
 2011-05-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-group.el (gnus-group-mark-article-read): It's possible that we
+       want to have `gnus-newsgroup-unselected' kept sorted.  If this isn't
+       done, then unselected articles may be marked as read.
+
        * pop3.el (pop3-open-server): Erase the buffer after the greeting,
        since not doing this seems to lead to a race condition in pop3-logon.
 
index 6c3a911..4c474b0 100644 (file)
@@ -4631,7 +4631,7 @@ This command may read the active file."
                  (push n gnus-newsgroup-unselected))
                (setq n (1+ n)))
              (setq gnus-newsgroup-unselected
-                   (nreverse gnus-newsgroup-unselected)))))
+                   (sort gnus-newsgroup-unselected '<)))))
       (gnus-activate-group group)
       (gnus-group-make-articles-read group (list article))
       (when (and (gnus-group-auto-expirable-p group)