From: Katsumi Yamaoka Date: Wed, 23 May 2007 11:24:05 +0000 (+0000) Subject: (mm-image-fit-p): Return t if image size is just the same as window size. X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=94f479b0381ce86e2a8b7cfd49f34295926ab731 (mm-image-fit-p): Return t if image size is just the same as window size. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9ab101799..c9a3b1f22 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-05-23 Katsumi Yamaoka + + * mm-decode.el (mm-image-fit-p): Return t if image size is just the + same as window size. + 2007-05-22 Kevin Ryde * message.el (message-font-lock-keywords): Use message-header-xheader diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index e739ee0e6..e632b993a 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -1370,14 +1370,14 @@ be determined." ;; 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)))) + (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)))))))) + (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."