aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2012-09-19 13:54:59 -0400
committerStefan Monnier2012-09-19 13:54:59 -0400
commit46624b4fa190e1bc7265494ff2f4b9990f577830 (patch)
tree3ad542bbc4c74fc78fef90d1c88f34585ec06110
parentdb8a5a189e743bf341a27276b1ca97471363b0b5 (diff)
downloademacs-46624b4fa190e1bc7265494ff2f4b9990f577830.tar.gz
emacs-46624b4fa190e1bc7265494ff2f4b9990f577830.zip
* lisp/doc-view.el (doc-view-guess-paper-size)
(doc-view-scale-bounding-box): Fix unbound `caddr'.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/doc-view.el10
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6dbe14f8776..8d90c818d22 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-09-19 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * doc-view.el (doc-view-guess-paper-size)
4 (doc-view-scale-bounding-box): Fix unbound `caddr'.
5
12012-09-19 Tassilo Horn <tsdh@gnu.org> 62012-09-19 Tassilo Horn <tsdh@gnu.org>
2 7
3 New feature: set optimal slice from BoundingBox information. 8 New feature: set optimal slice from BoundingBox information.
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 9c53a4a982e..65bf26e5eca 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1068,15 +1068,15 @@ dragging it to its bottom-right corner. See also
1068 (round (/ (* 100.0 x) y)))) 1068 (round (/ (* 100.0 x) y))))
1069 (let ((ar (div iw ih)) 1069 (let ((ar (div iw ih))
1070 (al (mapcar (lambda (l) 1070 (al (mapcar (lambda (l)
1071 (list (div (cadr l) (caddr l)) (car l))) 1071 (list (div (nth 1 l) (nth 2 l)) (car l)))
1072 doc-view-paper-sizes))) 1072 doc-view-paper-sizes)))
1073 (cadr (assoc ar al))))) 1073 (cadr (assoc ar al)))))
1074 1074
1075(defun doc-view-scale-bounding-box (ps iw ih bb) 1075(defun doc-view-scale-bounding-box (ps iw ih bb)
1076 (list (/ (* (nth 0 bb) iw) (cadr (assoc ps doc-view-paper-sizes))) 1076 (list (/ (* (nth 0 bb) iw) (nth 1 (assoc ps doc-view-paper-sizes)))
1077 (/ (* (nth 1 bb) ih) (caddr (assoc ps doc-view-paper-sizes))) 1077 (/ (* (nth 1 bb) ih) (nth 2 (assoc ps doc-view-paper-sizes)))
1078 (/ (* (nth 2 bb) iw) (cadr (assoc ps doc-view-paper-sizes))) 1078 (/ (* (nth 2 bb) iw) (nth 1 (assoc ps doc-view-paper-sizes)))
1079 (/ (* (nth 3 bb) ih) (caddr (assoc ps doc-view-paper-sizes))))) 1079 (/ (* (nth 3 bb) ih) (nth 2 (assoc ps doc-view-paper-sizes)))))
1080 1080
1081(defun doc-view-set-slice-from-bounding-box (&optional force-paper-size) 1081(defun doc-view-set-slice-from-bounding-box (&optional force-paper-size)
1082 "Set the slice from the document's BoundingBox information. 1082 "Set the slice from the document's BoundingBox information.