diff options
| author | Stefan Monnier | 2012-09-19 13:54:59 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-09-19 13:54:59 -0400 |
| commit | 46624b4fa190e1bc7265494ff2f4b9990f577830 (patch) | |
| tree | 3ad542bbc4c74fc78fef90d1c88f34585ec06110 | |
| parent | db8a5a189e743bf341a27276b1ca97471363b0b5 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/doc-view.el | 10 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-09-19 Tassilo Horn <tsdh@gnu.org> | 6 | 2012-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. |