shr-put-image: save-excursion on alt text
authorJulien Danjou <julien@danjou.info>
Thu, 28 Oct 2010 12:10:31 +0000 (14:10 +0200)
committerJulien Danjou <julien@danjou.info>
Thu, 28 Oct 2010 12:10:31 +0000 (14:10 +0200)
Signed-off-by: Julien Danjou <julien@danjou.info>
lisp/ChangeLog
lisp/shr.el

index 486999c..16d8b2e 100644 (file)
@@ -1,6 +1,8 @@
 2010-10-28  Julien Danjou  <julien@danjou.info>
 
        * shr.el (shr-put-image): Use point even if only inserting text.
+       (shr-put-image): Save excursion when inserting alt text on non-graphic
+       display, so the behaviour is the same when we are on a graphic display.
 
        * nnir.el (nnir-run-swish-e): Remove hyrex support.
 
index 403c57b..8bb532e 100644 (file)
@@ -378,8 +378,9 @@ redirects somewhere else."
                      (shr-rescale-image data))))
         (when image
           (put-image image point alt)))
-    (goto-char point)
-    (insert alt)))
+    (save-excursion
+      (goto-char point)
+      (insert alt))))
 
 (defun shr-rescale-image (data)
   (if (or (not (fboundp 'imagemagick-types))