diff options
| -rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/gnus/shr.el | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1e57106a2be..85d00c6607a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2010-10-28 Julien Danjou <julien@danjou.info> | 1 | 2010-10-28 Julien Danjou <julien@danjou.info> |
| 2 | 2 | ||
| 3 | * shr.el (shr-put-image): Use point even if only inserting text. | ||
| 4 | (shr-put-image): Save excursion when inserting alt text on non-graphic | ||
| 5 | display, so the behaviour is the same when we are on a graphic display. | ||
| 6 | |||
| 3 | * nnir.el (nnir-run-swish-e): Remove hyrex support. | 7 | * nnir.el (nnir-run-swish-e): Remove hyrex support. |
| 4 | 8 | ||
| 5 | 2010-10-28 Katsumi Yamaoka <yamaoka@jpl.org> | 9 | 2010-10-28 Katsumi Yamaoka <yamaoka@jpl.org> |
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 852f6cc826c..8bb532eb27e 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el | |||
| @@ -373,12 +373,14 @@ redirects somewhere else." | |||
| 373 | (kill-buffer (current-buffer))) | 373 | (kill-buffer (current-buffer))) |
| 374 | 374 | ||
| 375 | (defun shr-put-image (data point alt) | 375 | (defun shr-put-image (data point alt) |
| 376 | (if (not (display-graphic-p)) | 376 | (if (display-graphic-p) |
| 377 | (insert alt) | 377 | (let ((image (ignore-errors |
| 378 | (let ((image (ignore-errors | 378 | (shr-rescale-image data)))) |
| 379 | (shr-rescale-image data)))) | 379 | (when image |
| 380 | (when image | 380 | (put-image image point alt))) |
| 381 | (put-image image point alt))))) | 381 | (save-excursion |
| 382 | (goto-char point) | ||
| 383 | (insert alt)))) | ||
| 382 | 384 | ||
| 383 | (defun shr-rescale-image (data) | 385 | (defun shr-rescale-image (data) |
| 384 | (if (or (not (fboundp 'imagemagick-types)) | 386 | (if (or (not (fboundp 'imagemagick-types)) |