diff options
| author | Chong Yidong | 2011-01-28 14:13:01 -0500 |
|---|---|---|
| committer | Chong Yidong | 2011-01-28 14:13:01 -0500 |
| commit | 2f224f0b1a8d826ced25a1c8b7e79987090dbd08 (patch) | |
| tree | 61889efeeea7fa62436b4d9ab9e4e43ddb2f305f | |
| parent | 2e804fc7e740897d5ea457ca198f1aed278f395a (diff) | |
| download | emacs-2f224f0b1a8d826ced25a1c8b7e79987090dbd08.tar.gz emacs-2f224f0b1a8d826ced25a1c8b7e79987090dbd08.zip | |
* image-mode.el (image-display-size): Doc fix (Bug#7820).
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/image-mode.el | 17 |
2 files changed, 14 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 042d9464803..2e1a5f2e257 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-01-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * image-mode.el (image-display-size): Doc fix (Bug#7820). | ||
| 4 | |||
| 1 | 2011-01-27 Sam Steingold <sds@gnu.org> | 5 | 2011-01-27 Sam Steingold <sds@gnu.org> |
| 2 | 6 | ||
| 3 | * midnight.el (clean-buffer-list-kill-never-buffer-names): Remove | 7 | * midnight.el (clean-buffer-list-kill-never-buffer-names): Remove |
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index e99bed5cd4a..74fd96e8ade 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -118,13 +118,16 @@ A winprops object has the shape (WINDOW . ALIST)." | |||
| 118 | (declare-function image-size "image.c" (spec &optional pixels frame)) | 118 | (declare-function image-size "image.c" (spec &optional pixels frame)) |
| 119 | 119 | ||
| 120 | (defun image-display-size (spec &optional pixels frame) | 120 | (defun image-display-size (spec &optional pixels frame) |
| 121 | "Wrapper around `image-size', to handle slice display properties. | 121 | "Wrapper around `image-size', handling slice display properties. |
| 122 | If SPEC is an image display property, call `image-size' with the | 122 | Like `image-size', the return value is (WIDTH . HEIGHT). |
| 123 | given arguments. | 123 | WIDTH and HEIGHT are in canonical character units if PIXELS is |
| 124 | If SPEC is a list of properties containing `image' and `slice' | 124 | nil, and in pixel units if PIXELS is non-nil. |
| 125 | properties, calculate the display size from the slice property. | 125 | |
| 126 | If SPEC contains `image' but not `slice', call `image-size' with | 126 | If SPEC is an image display property, this function is equivalent |
| 127 | the specified image." | 127 | to `image-size'. If SPEC is a list of properties containing |
| 128 | `image' and `slice' properties, return the display size taking | ||
| 129 | the slice property into account. If the list contains `image' | ||
| 130 | but not `slice', return the `image-size' of the specified image." | ||
| 128 | (if (eq (car spec) 'image) | 131 | (if (eq (car spec) 'image) |
| 129 | (image-size spec pixels frame) | 132 | (image-size spec pixels frame) |
| 130 | (let ((image (assoc 'image spec)) | 133 | (let ((image (assoc 'image spec)) |