Function: mm-dissect-singlepart
mm-dissect-singlepart is a byte-compiled function defined in
mm-decode.el.gz.
Signature
(mm-dissect-singlepart CTL CTE &optional FORCE CDL DESCRIPTION ID)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/mm-decode.el.gz
(defun mm-dissect-singlepart (ctl cte &optional force cdl description id)
(when (or force
(if (equal "text/plain" (car ctl))
(assoc 'format ctl)
t))
;; Guess what the type of application/octet-stream parts should
;; really be.
(let ((filename (cdr (assq 'filename (cdr cdl)))))
(when (and (not mm-inhibit-auto-detect-attachment)
(equal (car ctl) "application/octet-stream")
filename
(string-match "\\.\\([^.]+\\)$" filename))
(let ((new-type (mailcap-extension-to-mime (match-string 1 filename))))
(when new-type
(setcar ctl new-type)))))
(let ((handle
(mm-make-handle
(mm-copy-to-buffer) ctl cte nil cdl description nil id))
(decoder (assoc (car ctl) (mm-archive-decoders))))
(if (and decoder
;; Do automatic decoding
(cadr decoder)
(executable-find (caddr decoder)))
(mm-dissect-archive handle)
handle))))