aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Abrahamsen2019-10-03 16:21:02 -0700
committerEric Abrahamsen2019-10-04 15:14:28 -0700
commit2ff16a483702ef064babf0823b20b2138fc1571a (patch)
tree5897d9d0acb3f90261b4290c841266f3e0be601e
parent8023715cf18d0b9e48fd0a4a72e4455edaa89813 (diff)
downloademacs-2ff16a483702ef064babf0823b20b2138fc1571a.tar.gz
emacs-2ff16a483702ef064babf0823b20b2138fc1571a.zip
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
-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."
4465 (setcar entry (length 4465 (setcar entry (length
4466 (gnus-list-of-unread-articles (car info))))) 4466 (gnus-list-of-unread-articles (car info)))))
4467 ;; The above `setcar' will only affect the hashtable, not 4467 ;; The above `setcar' will only affect the hashtable, not
4468 ;; the alist: update the alist separately. 4468 ;; the alist: update the alist separately, but only if
4469 (push info (cdr (setq gnus-newsrc-alist 4469 ;; it's been initialized.
4470 (remove (assoc-string 4470 (when gnus-newsrc-alist
4471 (gnus-info-group info) 4471 (push info (cdr (setq gnus-newsrc-alist
4472 gnus-newsrc-alist) 4472 (remove (assoc-string
4473 gnus-newsrc-alist))))) 4473 (gnus-info-group info)
4474 gnus-newsrc-alist)
4475 gnus-newsrc-alist))))))
4474 (error "No such group: %s" (gnus-info-group info)))))) 4476 (error "No such group: %s" (gnus-info-group info))))))
4475 4477
4476;; Ad-hoc function for inserting data from a different newsrc.eld 4478;; Ad-hoc function for inserting data from a different newsrc.eld