Function: mail-encode-header
mail-encode-header is a byte-compiled function defined in
sendmail.el.gz.
Signature
(mail-encode-header BEG END)
Documentation
Encode the mail header between BEG and END according to RFC2047.
Return non-nil if and only if some part of the header is encoded.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/sendmail.el.gz
(defun mail-encode-header (beg end)
"Encode the mail header between BEG and END according to RFC2047.
Return non-nil if and only if some part of the header is encoded."
(save-restriction
(narrow-to-region beg end)
(let* ((selected (select-message-coding-system))
(mm-coding-system-priorities
(if (and selected (coding-system-get selected :mime-charset))
(cons selected mm-coding-system-priorities)
mm-coding-system-priorities))
(tick (buffer-chars-modified-tick))
;; Many mailers, including Gnus, passes a message of which
;; the header is already encoded, so this is necessary to
;; prevent it from being encoded again.
(rfc2047-encode-encoded-words nil))
(rfc2047-encode-message-header)
(= tick (buffer-chars-modified-tick)))))