summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/gnus-group.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 915125b655c..742f8f4be56 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