# HG changeset patch # User Katsumi Yamaoka # Date 1288269951 0 # Node ID b6601148b588cfedf989f94537b8ec77ded75082 # Parent 7be484934a7c2ffb7ea6a245c6593ec7832a31ef shr.el (shr-put-image): Use point even if only inserting text; save-excursion on alt text. diff -r 7be484934a7c -r b6601148b588 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Thu Oct 28 10:41:27 2010 +0000 +++ b/lisp/gnus/ChangeLog Thu Oct 28 12:45:51 2010 +0000 @@ -1,5 +1,9 @@ 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. 2010-10-28 Katsumi Yamaoka diff -r 7be484934a7c -r b6601148b588 lisp/gnus/shr.el --- a/lisp/gnus/shr.el Thu Oct 28 10:41:27 2010 +0000 +++ b/lisp/gnus/shr.el Thu Oct 28 12:45:51 2010 +0000 @@ -373,12 +373,14 @@ (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))) + (save-excursion + (goto-char point) + (insert alt)))) (defun shr-rescale-image (data) (if (or (not (fboundp 'imagemagick-types))