[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2ff16a4: Don't manipulate gnus-newsrc-alist if it h
From: |
Eric Abrahamsen |
Subject: |
[Emacs-diffs] master 2ff16a4: Don't manipulate gnus-newsrc-alist if it hasn't been initalized |
Date: |
Fri, 4 Oct 2019 18:14:43 -0400 (EDT) |
branch: master
commit 2ff16a483702ef064babf0823b20b2138fc1571a
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Don't manipulate gnus-newsrc-alist if it hasn't been initalized
* lisp/gnus/gnus-group.el (gnus-group-set-info): Packages that use
Gnus summary mode without actually booting Gnus might end up in this
situation. See bug#36903
---
lisp/gnus/gnus-group.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 915125b..742f8f4 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4465,12 +4465,14 @@ and the second element is the address."
(setcar entry (length
(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)))))
+ ;; the alist: update the alist separately, but only if
+ ;; it's been initialized.
+ (when gnus-newsrc-alist
+ (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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 2ff16a4: Don't manipulate gnus-newsrc-alist if it hasn't been initalized,
Eric Abrahamsen <=