]> git.eshelyaron.com Git - emacs.git/commitdiff
Make sure gnus-group-set-info sets both the hashtable and alist
authorEric Abrahamsen <eric@ericabrahamsen.net>
Sun, 7 Jul 2019 23:25:14 +0000 (16:25 -0700)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Mon, 8 Jul 2019 17:49:14 +0000 (10:49 -0700)
* lisp/gnus/gnus-group.el (gnus-group-set-info): Apparently this
  method of updating the group info will only apply to the
  gnus-newsrc-hashtb, not gnus-newsrc-alist. Do the alist explicitly.

lisp/gnus/gnus-group.el

index ea695aaa97f87fdcf74d2793c0e2d675d9c0b4f5..2668e4fb7cd90c2daa691737fbcb70afc6c0d1d6 100644 (file)
@@ -4506,7 +4506,14 @@ and the second element is the address."
            (when (and (not (eq (car entry) t))
                       (gnus-active (gnus-info-group info)))
              (setcar entry (length
-                            (gnus-list-of-unread-articles (car info))))))
+                            (gnus-list-of-unread-articles (car info)))))
+           ;; The above `setcar' will only affect the hashtable, not
+           ;; the alist: update the alist separately.
+           (push info (cdr (setq gnus-newsrc-alist
+                                  (remove (assoc-string
+                                           (gnus-info-group info)
+                                           gnus-newsrc-alist)
+                                          gnus-newsrc-alist)))))
        (error "No such group: %s" (gnus-info-group info))))))
 
 ;; Ad-hoc function for inserting data from a different newsrc.eld