From: Lars Magne Ingebrigtsen Date: Sat, 7 Jan 2012 00:52:11 +0000 (+0100) Subject: Allow preview in message-mode to work outside of Gnus X-Git-Url: https://cgit.sxemacs.org/?a=commitdiff_plain;h=a3e445d4981b90286c163d26367f6e5923ce464f;p=gnus Allow preview in message-mode to work outside of Gnus (gnus-group-find-parameter): Protect against the group buffer not existing (bug#9585). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e1b4abb30..ee750e584 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,8 @@ when getting a single value as when getting all the values. This means that atoms like `gcc-self' work cumulatively, like variable settings, instead of getting the value from the last matching clause. + (gnus-group-find-parameter): Protect against the group buffer not + existing (bug#9585). 2012-01-06 Lars Magne Ingebrigtsen diff --git a/lisp/gnus.el b/lisp/gnus.el index b0d20274e..c858c5890 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -3876,7 +3876,9 @@ If SYMBOL, return the value of that symbol in the group parameters. If you call this function inside a loop, consider using the faster `gnus-group-fast-parameter' instead." - (with-current-buffer gnus-group-buffer + (with-current-buffer (if (buffer-live-p gnus-group-buffer) + gnus-group-buffer + (current-buffer)) (if symbol (gnus-group-fast-parameter group symbol allow-list) (nconc