Allow preview in message-mode to work outside of Gnus
authorLars Magne Ingebrigtsen <larsi@stories.(none)>
Sat, 7 Jan 2012 00:52:11 +0000 (01:52 +0100)
committerLars Magne Ingebrigtsen <larsi@stories.(none)>
Sat, 7 Jan 2012 00:52:11 +0000 (01:52 +0100)
(gnus-group-find-parameter): Protect against the group buffer not
existing (bug#9585).

lisp/ChangeLog
lisp/gnus.el

index e1b4abb..ee750e5 100644 (file)
@@ -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  <larsi@gnus.org>
 
index b0d2027..c858c58 100644 (file)
@@ -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