* mm-decode.el (mm-shr): Allow use from non-Gnus users.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 13 Oct 2010 18:34:22 +0000 (20:34 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 13 Oct 2010 18:34:22 +0000 (20:34 +0200)
lisp/ChangeLog
lisp/mm-decode.el

index 0f0ced5..81bb3a1 100644 (file)
@@ -1,5 +1,7 @@
 2010-10-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * mm-decode.el (mm-shr): Allow use from non-Gnus users.
+
        * gnus-spec.el (gnus-parse-simple-format): princ doesn't really insert
        anything in Emacs.
 
index 8be4bb7..1a05b4d 100644 (file)
@@ -1691,8 +1691,11 @@ If RECURSIVE, search recursively."
   ;; Require since we bind its variables.
   (require 'shr)
   (let ((article-buffer (current-buffer))
-       (shr-blocked-images (with-current-buffer gnus-summary-buffer
-                             gnus-blocked-images))
+       (shr-blocked-images (if (and (boundp gnus-summary-buffer)
+                                    (buffer-name gnus-summary-buffer))
+                               (with-current-buffer gnus-summary-buffer
+                                 gnus-blocked-images)
+                             shr-blocked-images))
        (shr-content-function (lambda (id)
                                (let ((handle (mm-get-content-id id)))
                                  (when handle