aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2010-08-30 23:29:56 +0000
committerKatsumi Yamaoka2010-08-30 23:29:56 +0000
commit929989ffacedcc454c805374a02522033889a886 (patch)
tree6c4be682b0ffc5663c12070769287c01e2999df3
parentf5ec697d93e389a9e770bdf336148f5e9505817f (diff)
downloademacs-929989ffacedcc454c805374a02522033889a886.tar.gz
emacs-929989ffacedcc454c805374a02522033889a886.zip
Make html image insertion probably work for XEmacs, too by Lars Magne Ingebrigtsen <larsi@gnus.org>.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-ems.el16
-rw-r--r--lisp/gnus/gnus-html.el6
3 files changed, 17 insertions, 10 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 79219bc5044..f2af7b2614f 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,10 @@
12010-08-30 Lars Magne Ingebrigtsen <larsi@gnus.org> 12010-08-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 2
3 * gnus-html.el (gnus-html-put-image): Use gnus-put-image.
4
5 * gnus-ems.el (gnus-put-image): Have gnus-put-image take an optional
6 point parameter.
7
3 * gnus-group.el (gnus-group-completing-read): Add 'substring to 8 * gnus-group.el (gnus-group-completing-read): Add 'substring to
4 completion-styles for group selection. 9 completion-styles for group selection.
5 10
diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el
index efa74146a91..b7dc4874f6d 100644
--- a/lisp/gnus/gnus-ems.el
+++ b/lisp/gnus/gnus-ems.el
@@ -274,13 +274,15 @@
274 (setq props (plist-put props :background (face-background face)))) 274 (setq props (plist-put props :background (face-background face))))
275 (apply 'create-image file type data-p props))) 275 (apply 'create-image file type data-p props)))
276 276
277(defun gnus-put-image (glyph &optional string category) 277(defun gnus-put-image (glyph &optional string category point)
278 (let ((point (point))) 278 (let ((point (or point (point))))
279 (insert-image glyph (or string " ")) 279 (save-excursion
280 (put-text-property point (point) 'gnus-image-category category) 280 (goto-char point)
281 (unless string 281 (put-image glyph point)
282 (put-text-property (1- (point)) (point) 282 (put-text-property point (point) 'gnus-image-category category)
283 'gnus-image-text-deletable t)) 283 (unless string
284 (put-text-property (1- (point)) (point)
285 'gnus-image-text-deletable t)))
284 glyph)) 286 glyph))
285 287
286(defun gnus-remove-image (image &optional category) 288(defun gnus-remove-image (image &optional category)
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index eb35aca505a..9c9908e0693 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -171,11 +171,11 @@
171 (= (car (image-size image t)) 30) 171 (= (car (image-size image t)) 30)
172 (= (cdr (image-size image t)) 30)))) 172 (= (cdr (image-size image t)) 30))))
173 (progn 173 (progn
174 (put-image image point) 174 (gnus-put-image image nil nil point)
175 t) 175 t)
176 (when (fboundp 'find-image) 176 (when (fboundp 'find-image)
177 (put-image (find-image '((:type xpm :file "lock-broken.xpm"))) 177 (gnus-put-image (find-image '((:type xpm :file "lock-broken.xpm")))
178 point)) 178 nil nil point))
179 nil))) 179 nil)))
180 180
181(defun gnus-html-prune-cache () 181(defun gnus-html-prune-cache ()