aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-01-28 14:13:01 -0500
committerChong Yidong2011-01-28 14:13:01 -0500
commit2f224f0b1a8d826ced25a1c8b7e79987090dbd08 (patch)
tree61889efeeea7fa62436b4d9ab9e4e43ddb2f305f
parent2e804fc7e740897d5ea457ca198f1aed278f395a (diff)
downloademacs-2f224f0b1a8d826ced25a1c8b7e79987090dbd08.tar.gz
emacs-2f224f0b1a8d826ced25a1c8b7e79987090dbd08.zip
* image-mode.el (image-display-size): Doc fix (Bug#7820).
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/image-mode.el17
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 @@
12011-01-28 Chong Yidong <cyd@stupidchicken.com>
2
3 * image-mode.el (image-display-size): Doc fix (Bug#7820).
4
12011-01-27 Sam Steingold <sds@gnu.org> 52011-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.
122If SPEC is an image display property, call `image-size' with the 122Like `image-size', the return value is (WIDTH . HEIGHT).
123given arguments. 123WIDTH and HEIGHT are in canonical character units if PIXELS is
124If SPEC is a list of properties containing `image' and `slice' 124nil, and in pixel units if PIXELS is non-nil.
125properties, calculate the display size from the slice property. 125
126If SPEC contains `image' but not `slice', call `image-size' with 126If SPEC is an image display property, this function is equivalent
127the specified image." 127to `image-size'. If SPEC is a list of properties containing
128`image' and `slice' properties, return the display size taking
129the slice property into account. If the list contains `image'
130but 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))