gnus-art.el (gnus-shr-put-image): Make it work as well for shr.el's that the old...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 18 Jul 2013 11:21:18 +0000 (11:21 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 18 Jul 2013 11:21:18 +0000 (11:21 +0000)
lisp/ChangeLog
lisp/gnus-art.el

index 163a9d3..db10d01 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-18  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-shr-put-image): Make it work as well for shr.el's
+       that the old Emacs 24s bundle.
+
 2013-07-10  David Engster  <deng@randomsample.de>
 
        * gnus-start.el (gnus-clean-old-newsrc): Always remove 'unexist' marks
index a8ee480..181e64a 100644 (file)
@@ -6198,9 +6198,14 @@ Provided for backwards compatibility."
 
 (defun gnus-shr-put-image (data alt &optional flags)
   "Put image DATA with a string ALT.  Enable image to be deleted."
-  (let ((image (shr-put-image data (propertize (or alt "*")
-                                              'gnus-image-category 'shr)
-                             flags)))
+  (let ((image (if flags
+                  (shr-put-image data (propertize (or alt "*")
+                                                  'gnus-image-category 'shr)
+                                 flags)
+                ;; Old `shr-put-image' doesn't take the optional `flags'
+                ;; argument.
+                (shr-put-image data (propertize (or alt "*")
+                                                'gnus-image-category 'shr)))))
     (when image
       (gnus-add-image 'shr image))))