summaryrefslogtreecommitdiff
path: root/lisp/image.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2007-09-27 06:38:29 +0000
committerGlenn Morris <rgm@gnu.org>2007-09-27 06:38:29 +0000
commit1e83e2caf748514412a7eead1382dc23489b1326 (patch)
treeac17fe9d44af13630cd331bc1128a80281a7e80c /lisp/image.el
parent5e8537bb53f70f4f71f78c4832d5bf0733f08b2a (diff)
downloademacs-1e83e2caf748514412a7eead1382dc23489b1326.tar.gz
(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.
Diffstat (limited to 'lisp/image.el')
-rw-r--r--lisp/image.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/image.el b/lisp/image.el
index e6c5b2e2d2c..77f8ffe02c2 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -343,10 +343,12 @@ This function is intended to be used from `magic-fallback-mode-alist'.
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)))))