]> git.eshelyaron.com Git - emacs.git/commitdiff
image-increase-size: Fix non-interactive calls
authorTino Calancha <tino.calancha@gmail.com>
Sun, 4 Sep 2016 01:59:07 +0000 (10:59 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Sun, 4 Sep 2016 01:59:07 +0000 (10:59 +0900)
* lisp/image.el (image-increase-size, image-decrease-size):
Compute a floating point division.
Problem reported in:
https://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00067.html

lisp/image.el

index 272cee53e4fd629661dbe70677bd27782c288a80..791a902a1b9ac105b98b6988af93d1008e3d57db 100644 (file)
@@ -957,7 +957,7 @@ If N is 3, then the image size will be increased by 30%.  The
 default is 20%."
   (interactive "P")
   (image--change-size (if n
-                          (1+ (/ n 10))
+                          (1+ (/ n 10.0))
                         1.2)))
 
 (defun image-decrease-size (n)
@@ -966,7 +966,7 @@ If N is 3, then the image size will be decreased by 30%.  The
 default is 20%."
   (interactive "P")
   (image--change-size (if n
-                          (- 1 (/ n 10))
+                          (- 1 (/ n 10.0))
                         0.8)))
 
 (defun image--get-image ()