Function: image-type-auto-detected-p
image-type-auto-detected-p is an autoloaded and byte-compiled function
defined in image.el.gz.
Signature
(image-type-auto-detected-p)
Documentation
Return t if the current buffer contains an auto-detectable image.
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 with a
non-nil value. If that value is non-nil, but not t, then the image type
must be available.
Source Code
;; Defined in /usr/src/emacs/lisp/image.el.gz
;;;###autoload
(defun image-type-auto-detected-p ()
"Return t if the current buffer contains an auto-detectable image.
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' 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 auto
(or (eq auto t) (image-type-available-p type)))))