emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110944: lisp/image-mode.el (image


From: Wolfgang Jenkner
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110944: lisp/image-mode.el (image-transform-check-size): Use assertions only
Date: Fri, 23 Nov 2012 18:41:01 +0100
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110944
committer: Wolfgang Jenkner <address@hidden>
branch nick: emacs-24
timestamp: Fri 2012-11-23 18:41:01 +0100
message:
  lisp/image-mode.el (image-transform-check-size): Use assertions only
  for images of type imagemagick.
  
  Otherwise no error, image-transform-fit-to-{width,height} is
  silently ignored, as before.  Doc fix.
modified:
  lisp/ChangeLog
  lisp/image-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-11-23 07:59:43 +0000
+++ b/lisp/ChangeLog    2012-11-23 17:41:01 +0000
@@ -1,3 +1,11 @@
+2012-11-23  Wolfgang Jenkner  <address@hidden>
+
+       * image-mode.el (image-transform-check-size): Use assertions only
+       for images of type imagemagick.
+
+       Otherwise no error, image-transform-fit-to-{width,height} is
+       silently ignored, as before.  Doc fix.
+
 2012-11-23  Chong Yidong  <address@hidden>
 
        * faces.el (color-defined-p): Doc fix (Bug#12853).

=== modified file 'lisp/image-mode.el'
--- a/lisp/image-mode.el        2012-09-27 03:16:35 +0000
+++ b/lisp/image-mode.el        2012-11-23 17:41:01 +0000
@@ -746,8 +746,14 @@
            h)))))
 
 (defun image-transform-check-size ()
-  "Check that the image exactly fits the width/height of the window."
-  (unless (numberp image-transform-resize)
+  "Check that the image exactly fits the width/height of the window.
+
+Do this for an image of type `imagemagick' to make sure that the
+elisp code matches the way ImageMagick computes the bounding box
+of a rotated image."
+  (when (and (not (numberp image-transform-resize))
+            (boundp 'image-type)
+            (eq image-type 'imagemagick))
     (let ((size (image-display-size (image-get-display-property) t)))
       (cond ((eq image-transform-resize 'fit-width)
             (cl-assert (= (car size)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]