Function: rmail-is-text-p

rmail-is-text-p is a byte-compiled function defined in rmail.el.gz.

Signature

(rmail-is-text-p)

Documentation

Return t if the region contains a text message, nil otherwise.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rmail.el.gz
(defun rmail-is-text-p ()
  "Return t if the region contains a text message, nil otherwise."
  (save-excursion
    (let ((text-regexp "\\(text\\|message\\)/")
	  (content-type-header (mail-fetch-field "content-type")))
      ;; The message is text if either there is no content type header
      ;; (a default of "text/plain; charset=US-ASCII" is assumed) or
      ;; the base content type is either text or message.
      (or (not content-type-header)
	  (and (string-match text-regexp content-type-header) t)))))