]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/doc-view.el (doc-view-guess-paper-size)
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 19 Sep 2012 17:54:59 +0000 (13:54 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 19 Sep 2012 17:54:59 +0000 (13:54 -0400)
(doc-view-scale-bounding-box): Fix unbound `caddr'.

lisp/ChangeLog
lisp/doc-view.el

index 6dbe14f8776cc2edf017e6dbab9d2d0f76d6f863..8d90c818d22645e88dc1736732e9fd9b762e9d23 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * doc-view.el (doc-view-guess-paper-size)
+       (doc-view-scale-bounding-box): Fix unbound `caddr'.
+
 2012-09-19  Tassilo Horn  <tsdh@gnu.org>
 
        New feature: set optimal slice from BoundingBox information.
index 9c53a4a982e88b988ec2213bc0abaed85159ebe7..65bf26e5ecabff98f1969133a4ada188dcc9b999 100644 (file)
@@ -1068,15 +1068,15 @@ dragging it to its bottom-right corner.  See also
                   (round (/ (* 100.0 x) y))))
     (let ((ar (div iw ih))
          (al (mapcar (lambda (l)
-                       (list (div (cadr l) (caddr l)) (car l)))
+                       (list (div (nth 1 l) (nth 2 l)) (car l)))
                      doc-view-paper-sizes)))
       (cadr (assoc ar al)))))
 
 (defun doc-view-scale-bounding-box (ps iw ih bb)
-  (list (/ (* (nth 0 bb) iw) (cadr (assoc ps doc-view-paper-sizes)))
-       (/ (* (nth 1 bb) ih) (caddr (assoc ps doc-view-paper-sizes)))
-       (/ (* (nth 2 bb) iw) (cadr (assoc ps doc-view-paper-sizes)))
-       (/ (* (nth 3 bb) ih) (caddr (assoc ps doc-view-paper-sizes)))))
+  (list (/ (* (nth 0 bb) iw) (nth 1 (assoc ps doc-view-paper-sizes)))
+       (/ (* (nth 1 bb) ih) (nth 2 (assoc ps doc-view-paper-sizes)))
+       (/ (* (nth 2 bb) iw) (nth 1 (assoc ps doc-view-paper-sizes)))
+       (/ (* (nth 3 bb) ih) (nth 2 (assoc ps doc-view-paper-sizes)))))
 
 (defun doc-view-set-slice-from-bounding-box (&optional force-paper-size)
   "Set the slice from the document's BoundingBox information.