diff options
author | Miles Bader <miles@gnu.org> | 2007-06-14 10:02:55 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-06-14 10:02:55 +0000 |
commit | 524705ae2da95c571fedb83b3a1c3a80e1335a72 (patch) | |
tree | 81902cb72a561aa7ae0af419c8481fc10965f40e /lisp/gnus/mm-decode.el | |
parent | 1f445a397e3411eda2c6baf712b7a48a7de26c8d (diff) | |
download | emacs-524705ae2da95c571fedb83b3a1c3a80e1335a72.tar.gz emacs-524705ae2da95c571fedb83b3a1c3a80e1335a72.tar.bz2 emacs-524705ae2da95c571fedb83b3a1c3a80e1335a72.zip |
Merge from gnus--rel--5.10
Patches applied:
* emacs--devo--0 (patch 725, 740-741, 749, 768, 777, 786, 788-789, 792)
- Merge from gnus--rel--5.10
- Update from CVS
- Merge from emacs--rel--22, gnus--rel--5.10
* gnus--rel--5.10 (patch 217-229)
- Update from CVS
- Merge from emacs--devo--0, emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--rel--22--patch-44
Diffstat (limited to 'lisp/gnus/mm-decode.el')
-rw-r--r-- | lisp/gnus/mm-decode.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 6d52d8b2f16..028855ab341 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1371,18 +1371,19 @@ be determined." (defun mm-image-fit-p (handle) "Say whether the image in HANDLE will fit the current window." (let ((image (mm-get-image handle))) - (if (fboundp 'glyph-width) - ;; XEmacs' glyphs can actually tell us about their width, so - ;; lets be nice and smart about them. - (or mm-inline-large-images - (and (< (glyph-width image) (window-pixel-width)) - (< (glyph-height image) (window-pixel-height)))) - (let* ((size (image-size image)) - (w (car size)) - (h (cdr size))) - (or mm-inline-large-images - (and (< h (1- (window-height))) ; Don't include mode line. - (< w (window-width)))))))) + (or (not image) + (if (fboundp 'glyph-width) + ;; XEmacs' glyphs can actually tell us about their width, so + ;; lets be nice and smart about them. + (or mm-inline-large-images + (and (<= (glyph-width image) (window-pixel-width)) + (<= (glyph-height image) (window-pixel-height)))) + (let* ((size (image-size image)) + (w (car size)) + (h (cdr size))) + (or mm-inline-large-images + (and (<= h (1- (window-height))) ; Don't include mode line. + (<= w (window-width))))))))) (defun mm-valid-image-format-p (format) "Say whether FORMAT can be displayed natively by Emacs." |