Function: gnus-summary-repair-multipart

gnus-summary-repair-multipart is an interactive and byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-summary-repair-multipart ARTICLE)

Documentation

Add a Content-Type header to a multipart article without one.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-repair-multipart (article)
  "Add a Content-Type header to a multipart article without one."
  (interactive (list (gnus-summary-article-number)) gnus-summary-mode)
  (gnus-with-article article
    (message-narrow-to-head)
    (message-remove-header "Mime-Version")
    (goto-char (point-max))
    (insert "Mime-Version: 1.0\n")
    (widen)
    (when (search-forward "\n--" nil t)
      (let ((separator (buffer-substring (point) (line-end-position))))
	(message-narrow-to-head)
	(message-remove-header "Content-Type")
	(goto-char (point-max))
	(insert (format "Content-Type: multipart/mixed; boundary=\"%s\"\n"
			separator))
	(widen))))
  (let (gnus-mark-article-hook)
    (gnus-summary-select-article t t nil article)))