Commit 1e83e2ca authored by Glenn Morris's avatar Glenn Morris

(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.
parent 5e8537bb
......@@ -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)))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment