diff options
| author | Katsumi Yamaoka | 2010-08-31 00:07:40 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-08-31 00:07:40 +0000 |
| commit | fb16bb4689c1fc211880e997e836a01f7676f418 (patch) | |
| tree | 66061aeacb843332b713fcc6173a7f1771f8acdf | |
| parent | 77ae8989c42c10e137c77384e6634f3bbaf99cf0 (diff) | |
| download | emacs-fb16bb4689c1fc211880e997e836a01f7676f418.tar.gz emacs-fb16bb4689c1fc211880e997e836a01f7676f418.zip | |
Use gnus-create-image to be XEmacs-compatible; Don't do images on non-graphic displays; by Lars Magne Ingebrigtsen <larsi@gnus.org>.
| -rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-html.el | 33 |
2 files changed, 22 insertions, 15 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7a88b5f7782..11ab72d21d3 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2010-08-30 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2010-08-30 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * gnus-html.el (gnus-html-put-image): Use gnus-create-image to be | ||
| 4 | XEmacs-compatible. | ||
| 5 | (gnus-html-put-image): Don't do images on non-graphic displays. | ||
| 6 | |||
| 3 | * nnslashdot.el: Removed this unused backend. | 7 | * nnslashdot.el: Removed this unused backend. |
| 4 | 8 | ||
| 5 | * gnus-undo.el (gnus-undo-register-1): Limit the undo actions to 100 | 9 | * gnus-undo.el (gnus-undo-register-1): Limit the undo actions to 100 |
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 7bfb3cd785d..cabfe345123 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el | |||
| @@ -162,21 +162,24 @@ | |||
| 162 | (gnus-html-schedule-image-fetching buffer images))))) | 162 | (gnus-html-schedule-image-fetching buffer images))))) |
| 163 | 163 | ||
| 164 | (defun gnus-html-put-image (file point) | 164 | (defun gnus-html-put-image (file point) |
| 165 | (let ((image (ignore-errors | 165 | (when (display-graphic-p) |
| 166 | (create-image file)))) | 166 | (let ((image (ignore-errors |
| 167 | (if (and image | 167 | (gnus-create-image file)))) |
| 168 | ;; Kludge to avoid displaying 30x30 gif images, which | 168 | (save-excursion |
| 169 | ;; seems to be a signal of a broken image. | 169 | (goto-char point) |
| 170 | (not (and (eq (getf (cdr image) :type) 'gif) | 170 | (if (and image |
| 171 | (= (car (image-size image t)) 30) | 171 | ;; Kludge to avoid displaying 30x30 gif images, which |
| 172 | (= (cdr (image-size image t)) 30)))) | 172 | ;; seems to be a signal of a broken image. |
| 173 | (progn | 173 | (not (and (eq (getf (cdr image) :type) 'gif) |
| 174 | (gnus-put-image image nil nil point) | 174 | (= (car (image-size image t)) 30) |
| 175 | t) | 175 | (= (cdr (image-size image t)) 30)))) |
| 176 | (when (fboundp 'find-image) | 176 | (progn |
| 177 | (gnus-put-image (find-image '((:type xpm :file "lock-broken.xpm"))) | 177 | (gnus-put-image image) |
| 178 | nil nil point)) | 178 | t) |
| 179 | nil))) | 179 | (when (fboundp 'find-image) |
| 180 | (gnus-put-image (find-image | ||
| 181 | '((:type xpm :file "lock-broken.xpm"))))) | ||
| 182 | nil))))) | ||
| 180 | 183 | ||
| 181 | (defun gnus-html-prune-cache () | 184 | (defun gnus-html-prune-cache () |
| 182 | (let ((total-size 0) | 185 | (let ((total-size 0) |