[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101232: Use gnus-create-image to be
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101232: Use gnus-create-image to be XEmacs-compatible; Don't do images on non-graphic displays; by Lars Magne Ingebrigtsen <address@hidden>. |
Date: |
Tue, 31 Aug 2010 00:07:40 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101232
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Tue 2010-08-31 00:07:40 +0000
message:
Use gnus-create-image to be XEmacs-compatible; Don't do images on non-graphic
displays; by Lars Magne Ingebrigtsen <address@hidden>.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-html.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-08-30 23:53:47 +0000
+++ b/lisp/gnus/ChangeLog 2010-08-31 00:07:40 +0000
@@ -1,5 +1,9 @@
2010-08-30 Lars Magne Ingebrigtsen <address@hidden>
+ * gnus-html.el (gnus-html-put-image): Use gnus-create-image to be
+ XEmacs-compatible.
+ (gnus-html-put-image): Don't do images on non-graphic displays.
+
* nnslashdot.el: Removed this unused backend.
* gnus-undo.el (gnus-undo-register-1): Limit the undo actions to 100
=== modified file 'lisp/gnus/gnus-html.el'
--- a/lisp/gnus/gnus-html.el 2010-08-30 23:35:19 +0000
+++ b/lisp/gnus/gnus-html.el 2010-08-31 00:07:40 +0000
@@ -162,21 +162,24 @@
(gnus-html-schedule-image-fetching buffer images)))))
(defun gnus-html-put-image (file point)
- (let ((image (ignore-errors
- (create-image file))))
- (if (and image
- ;; Kludge to avoid displaying 30x30 gif images, which
- ;; seems to be a signal of a broken image.
- (not (and (eq (getf (cdr image) :type) 'gif)
- (= (car (image-size image t)) 30)
- (= (cdr (image-size image t)) 30))))
- (progn
- (gnus-put-image image nil nil point)
- t)
- (when (fboundp 'find-image)
- (gnus-put-image (find-image '((:type xpm :file "lock-broken.xpm")))
- nil nil point))
- nil)))
+ (when (display-graphic-p)
+ (let ((image (ignore-errors
+ (gnus-create-image file))))
+ (save-excursion
+ (goto-char point)
+ (if (and image
+ ;; Kludge to avoid displaying 30x30 gif images, which
+ ;; seems to be a signal of a broken image.
+ (not (and (eq (getf (cdr image) :type) 'gif)
+ (= (car (image-size image t)) 30)
+ (= (cdr (image-size image t)) 30))))
+ (progn
+ (gnus-put-image image)
+ t)
+ (when (fboundp 'find-image)
+ (gnus-put-image (find-image
+ '((:type xpm :file "lock-broken.xpm")))))
+ nil)))))
(defun gnus-html-prune-cache ()
(let ((total-size 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101232: Use gnus-create-image to be XEmacs-compatible; Don't do images on non-graphic displays; by Lars Magne Ingebrigtsen <address@hidden>.,
Katsumi Yamaoka <=