Function: url-cid-gnus

url-cid-gnus is a byte-compiled function defined in url-cid.el.gz.

Signature

(url-cid-gnus CID)

Source Code

;; Defined in /usr/src/emacs/lisp/url/url-cid.el.gz
(defun url-cid-gnus (cid)
  (let ((content-type nil)
        (encoding nil)
        (part nil)
        (data nil))
    (setq part (mm-get-content-id cid))
    (if (not part)
	(message "Unknown CID encountered: %s" cid)
      (setq data (with-current-buffer (mm-handle-buffer part)
		   (buffer-string))
	    content-type (mm-handle-type part)
	    encoding (symbol-name (mm-handle-encoding part)))
      (if (= 0 (length content-type)) (setq content-type "text/plain"))
      (if (= 0 (length encoding)) (setq encoding "8bit"))
      (if (listp content-type)
	  (setq content-type (car content-type)))
      (insert (format "Content-length: %d\r\n"  (length data))
	      "Content-type: " content-type "\r\n"
	      "Content-transfer-encoding: " encoding "\r\n"
	      "\r\n"
	      (or data "")))))