emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 64d0648: Make sure gnus-group-set-info sets both th


From: Eric Abrahamsen
Subject: [Emacs-diffs] master 64d0648: Make sure gnus-group-set-info sets both the hashtable and alist
Date: Mon, 8 Jul 2019 13:49:27 -0400 (EDT)

branch: master
commit 64d0648f1d433614f423afde0d70f536ef65b660
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    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 ea695aa..2668e4f 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]