]> git.eshelyaron.com Git - emacs.git/commitdiff
gnus-html.el (gnus-html-put-image): Register a displayer.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 13 May 2011 05:35:56 +0000 (05:35 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 13 May 2011 05:35:56 +0000 (05:35 +0000)
shr.el (shr-image-displayer): Don't remove text props from alt text.

lisp/gnus/ChangeLog
lisp/gnus/gnus-html.el
lisp/gnus/shr.el

index 6f4bc302570ddb7c1191e5455f1ecebca5533fb0..8dad14c44ae809e2956d7d2dd047b6417d06e241 100644 (file)
@@ -1,3 +1,9 @@
+2011-05-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-html.el (gnus-html-put-image): Register a displayer.
+
+       * shr.el (shr-image-displayer): Don't remove text props from alt text.
+
 2011-05-13  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * registry.el (prune-factor): New initialization parameter defaulting
index b7f0c0922a3be0a1e4c1f058bb47fc137a50ccbd..a4c4fa55d9a199b0d13e344490a2ca69904616ed 100644 (file)
@@ -482,8 +482,14 @@ Return a string with image data."
                     (gnus-put-text-property start (point)
                                            'gnus-alt-text alt-text)
                     (when url
-                      (gnus-put-text-property start (point)
-                                             'image-url url))
+                     (gnus-add-text-properties
+                      start (point)
+                      `(image-url
+                        ,url
+                        image-displayer
+                        (lambda (url start end)
+                          (gnus-html-display-image ,url ,start ,(point)
+                                                   ,alt-text)))))
                     (gnus-add-image 'external image)
                     t)
                 ;; Bad image, try to show something else
index 75c6d5d9ce775a695d92ea809b5ccc0e8797fbad..edd106618dfb6ecd20eaf0180881702b2bf39a7a 100644 (file)
@@ -582,7 +582,7 @@ START, and END.  Note that START and END should be merkers."
                 (when image
                   (goto-char start)
                   (funcall shr-put-image-function
-                           image (buffer-substring-no-properties start end))
+                           image (buffer-substring start end))
                   (delete-region (point) end))))
         (url-retrieve url 'shr-image-fetched
                       (list (current-buffer) start end)