Function: mm-inline-text

mm-inline-text is a byte-compiled function defined in mm-view.el.gz.

Signature

(mm-inline-text HANDLE)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/mm-view.el.gz
(defun mm-inline-text (handle)
  (let ((b (point))
	(type (mm-handle-media-subtype handle))
	(charset (mail-content-type-get
		  (mm-handle-type handle) 'charset))
	(inhibit-read-only t))
    (if (or (eq charset 'gnus-decoded)
	    ;; This is probably not entirely correct, but
	    ;; makes rfc822 parts with embedded multiparts work.
	    (eq mail-parse-charset 'gnus-decoded))
	(save-restriction
	  (narrow-to-region (point) (point))
	  (mm-insert-part handle)
	  (goto-char (point-max)))
      (mm-display-inline-fontify handle))
    (when (and mm-fill-flowed
	       (equal type "plain")
	       (equal (cdr (assoc 'format (mm-handle-type handle)))
		      "flowed"))
      (save-restriction
	(narrow-to-region b (point))
	(goto-char b)
	(fill-flowed nil (cl-equalp (cdr (assoc 'delsp (mm-handle-type handle)))
				    "yes"))
	(goto-char (point-max))))
    (save-restriction
      (narrow-to-region b (point))
      (when (member type '("enriched" "richtext"))
        (set-text-properties (point-min) (point-max) nil)
	(ignore-errors
	  (enriched-decode (point-min) (point-max))))
      (mm-handle-set-undisplayer
       handle
       (if (= (point-min) (point-max))
	   #'ignore
	 (let ((beg (copy-marker (point-min) t))
	       (end (point-max-marker)))
	   (lambda ()
	     (let ((inhibit-read-only t))
	       (delete-region beg end)))))))))