From 64d0648f1d433614f423afde0d70f536ef65b660 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sun, 7 Jul 2019 16:25:14 -0700 Subject: [PATCH] Make sure gnus-group-set-info sets both the hashtable and alist * 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index ea695aaa97f..2668e4fb7cd 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -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 -- 2.39.2