shr: fix alt insertion
authorJulien Danjou <julien@danjou.info>
Thu, 28 Oct 2010 12:04:42 +0000 (14:04 +0200)
committerJulien Danjou <julien@danjou.info>
Thu, 28 Oct 2010 12:05:54 +0000 (14:05 +0200)
Signed-off-by: Julien Danjou <julien@danjou.info>
lisp/ChangeLog
lisp/shr.el

index 10ca6ce..486999c 100644 (file)
@@ -1,5 +1,7 @@
 2010-10-28  Julien Danjou  <julien@danjou.info>
 
+       * shr.el (shr-put-image): Use point even if only inserting text.
+
        * nnir.el (nnir-run-swish-e): Remove hyrex support.
 
 2010-10-28  Katsumi Yamaoka  <yamaoka@jpl.org>
index 852f6cc..403c57b 100644 (file)
@@ -373,12 +373,13 @@ redirects somewhere else."
   (kill-buffer (current-buffer)))
 
 (defun shr-put-image (data point alt)
-  (if (not (display-graphic-p))
-      (insert alt)
-    (let ((image (ignore-errors
-                  (shr-rescale-image data))))
-      (when image
-       (put-image image point alt)))))
+  (if (display-graphic-p)
+      (let ((image (ignore-errors
+                     (shr-rescale-image data))))
+        (when image
+          (put-image image point alt)))
+    (goto-char point)
+    (insert alt)))
 
 (defun shr-rescale-image (data)
   (if (or (not (fboundp 'imagemagick-types))