From 2c7930a5eaed5a455762e959ed8ba5c0d2afd2bb Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 28 Oct 2010 14:10:31 +0200 Subject: [PATCH] shr-put-image: save-excursion on alt text Signed-off-by: Julien Danjou --- lisp/ChangeLog | 2 ++ lisp/shr.el | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 486999cd5..16d8b2e8a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,8 @@ 2010-10-28 Julien Danjou * 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. diff --git a/lisp/shr.el b/lisp/shr.el index 403c57bb7..8bb532eb2 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -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)) -- 2.25.1