Mercurial > emacs
changeset 84944:186e9ba3989a
(image-type-auto-detected-p): Doc fix. Don't detect an image if it is
not in image-type-auto-detectable, or is there with a nil value.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 27 Sep 2007 06:38:29 +0000 |
parents | edbd4ad65565 |
children | 28a13973d035 |
files | lisp/image.el |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/image.el Thu Sep 27 06:38:15 2007 +0000 +++ b/lisp/image.el Thu Sep 27 06:38:29 2007 +0000 @@ -343,10 +343,12 @@ The buffer is considered to contain an auto-detectable image if its beginning matches an image type in `image-type-header-regexps', -and that image type is present in `image-type-auto-detectable'." +and that image type is present in `image-type-auto-detectable' with a +non-nil value. If that value is non-nil, but not t, then the image type +must be available." (let* ((type (image-type-from-buffer)) (auto (and type (cdr (assq type image-type-auto-detectable))))) - (and type + (and type auto (or (eq auto t) (image-type-available-p type)))))