mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-07 16:10:46 -08:00
shr.el (shr-put-image): Use point even if only inserting text; save-excursion on alt text.
This commit is contained in:
parent
cfe94935c8
commit
4abff9048d
2 changed files with 12 additions and 6 deletions
|
|
@ -1,5 +1,9 @@
|
|||
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.
|
||||
|
||||
2010-10-28 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
|
|
|||
|
|
@ -373,12 +373,14 @@ 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)))
|
||||
(save-excursion
|
||||
(goto-char point)
|
||||
(insert alt))))
|
||||
|
||||
(defun shr-rescale-image (data)
|
||||
(if (or (not (fboundp 'imagemagick-types))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue