Mercurial > emacs
diff lisp/gnus/gnus-ems.el @ 110040:63fee04d3f81
Make html image insertion probably work for XEmacs, too by Lars Magne Ingebrigtsen <larsi@gnus.org>.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 30 Aug 2010 23:29:56 +0000 |
parents | 1d1d5d9bd884 |
children | 46d881ed5491 |
line wrap: on
line diff
--- a/lisp/gnus/gnus-ems.el Mon Aug 30 23:24:56 2010 +0000 +++ b/lisp/gnus/gnus-ems.el Mon Aug 30 23:29:56 2010 +0000 @@ -274,13 +274,15 @@ (setq props (plist-put props :background (face-background face)))) (apply 'create-image file type data-p props))) -(defun gnus-put-image (glyph &optional string category) - (let ((point (point))) - (insert-image glyph (or string " ")) - (put-text-property point (point) 'gnus-image-category category) - (unless string - (put-text-property (1- (point)) (point) - 'gnus-image-text-deletable t)) +(defun gnus-put-image (glyph &optional string category point) + (let ((point (or point (point)))) + (save-excursion + (goto-char point) + (put-image glyph point) + (put-text-property point (point) 'gnus-image-category category) + (unless string + (put-text-property (1- (point)) (point) + 'gnus-image-text-deletable t))) glyph)) (defun gnus-remove-image (image &optional category)