Function: mm-image-type-from-buffer
mm-image-type-from-buffer is a byte-compiled function defined in
mm-decode.el.gz.
Signature
(mm-image-type-from-buffer)
Documentation
Determine the image type from data in the current buffer.
Value is a symbol specifying the image type or nil if type cannot be determined.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/mm-decode.el.gz
;; Steal from image.el. image-type-from-data suffers multi-line matching bug.
(defun mm-image-type-from-buffer ()
"Determine the image type from data in the current buffer.
Value is a symbol specifying the image type or nil if type cannot
be determined."
(let ((types mm-image-type-regexps)
type)
(goto-char (point-min))
(while (and types (null type))
(let ((regexp (car (car types)))
(image-type (cdr (car types))))
(when (looking-at regexp)
(setq type image-type))
(setq types (cdr types))))
type))