From 2f224f0b1a8d826ced25a1c8b7e79987090dbd08 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 28 Jan 2011 14:13:01 -0500 Subject: [PATCH] * image-mode.el (image-display-size): Doc fix (Bug#7820). --- lisp/ChangeLog | 4 ++++ 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 @@ +2011-01-28 Chong Yidong + + * image-mode.el (image-display-size): Doc fix (Bug#7820). + 2011-01-27 Sam Steingold * 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)." (declare-function image-size "image.c" (spec &optional pixels frame)) (defun image-display-size (spec &optional pixels frame) - "Wrapper around `image-size', to handle slice display properties. -If SPEC is an image display property, call `image-size' with the -given arguments. -If SPEC is a list of properties containing `image' and `slice' -properties, calculate the display size from the slice property. -If SPEC contains `image' but not `slice', call `image-size' with -the specified image." + "Wrapper around `image-size', handling slice display properties. +Like `image-size', the return value is (WIDTH . HEIGHT). +WIDTH and HEIGHT are in canonical character units if PIXELS is +nil, and in pixel units if PIXELS is non-nil. + +If SPEC is an image display property, this function is equivalent +to `image-size'. If SPEC is a list of properties containing +`image' and `slice' properties, return the display size taking +the slice property into account. If the list contains `image' +but not `slice', return the `image-size' of the specified image." (if (eq (car spec) 'image) (image-size spec pixels frame) (let ((image (assoc 'image spec)) -- 2.39.2