Function: rfc2047-encodable-p

rfc2047-encodable-p is a byte-compiled function defined in rfc2047.el.gz.

Signature

(rfc2047-encodable-p)

Documentation

Return non-nil if any characters in current buffer need encoding in headers.

The buffer may be narrowed.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rfc2047.el.gz
;; Fixme: This, and the require below may not be the Right Thing, but
;; should be safe just before release.  -- fx 2001-02-08

(defun rfc2047-encodable-p ()
  "Return non-nil if any characters in current buffer need encoding in headers.
The buffer may be narrowed."
  (let ((charsets
	 (mm-find-mime-charset-region (point-min) (point-max))))
    (goto-char (point-min))
    (or (and rfc2047-encode-encoded-words
	     (prog1
		 (re-search-forward rfc2047-encoded-word-regexp nil t)
	       (goto-char (point-min))))
	(and charsets
	     (not (equal charsets (list (car (bound-and-true-p message-posting-charset)))))))))