(mm-image-fit-p): Return t if image size is just the same as window size.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 23 May 2007 11:24:05 +0000 (11:24 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 23 May 2007 11:24:05 +0000 (11:24 +0000)
lisp/ChangeLog
lisp/mm-decode.el

index 9ab1017..c9a3b1f 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-decode.el (mm-image-fit-p): Return t if image size is just the
+       same as window size.
+
 2007-05-22  Kevin Ryde  <user42@zip.com.au>
 
        * message.el (message-font-lock-keywords): Use message-header-xheader
index e739ee0..e632b99 100644 (file)
@@ -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."