;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:45:00 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/gnus/mm-encode.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`mm-encode.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\303\304\305\"\207" [require mail-parse mailcap autoload mm-body-7-or-8 "mm-bodies"] 3)
#@186 Alist of regexps that match MIME types and their encodings.
If the encoding is `qp-or-base64', then either quoted-printable
or base64 will be used, depending on what is more efficient.
(defvar mm-content-transfer-encoding-defaults '(("text/x-patch" 8bit) ("text/.*" qp-or-base64) ("message/rfc822" 8bit) ("application/emacs-lisp" 8bit) ("application/x-emacs-lisp" 8bit) ("application/x-patch" 8bit) (".*" base64)) (#$ . 752))
#@466 If non-nil, use encodings aimed at Procrustean bed survival.

This means that textual parts are encoded as quoted-printable if they
contain lines longer than 76 characters or starting with "From " in
the body.  Non-7bit encodings (8bit, binary) are generally disallowed.
This is to reduce the probability that a broken MTA or MDA changes the
message.

This variable should never be set directly, but bound before a call to
`mml-generate-mime' or similar functions.
(defvar mm-use-ultra-safe-encoding nil (#$ . 1185))
#@54 Insert text/plain headers with CHARSET and ENCODING.
(defalias 'mm-insert-rfc822-headers #[(charset encoding) "\302c\210\303\304\305!\227!\306\261\210\307\305	!\227\306\261\207" [charset encoding "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=" mail-quote-string symbol-name "\n" "Content-Transfer-Encoding: "] 4 (#$ . 1708)])
#@33 Insert multipart/mixed headers.
(defalias 'mm-insert-multipart-headers #[nil "\301\302c\210\303\304\261\210)\207" [boundary "=-=-=" "MIME-Version: 1.0\n" "Content-Type: multipart/mixed; boundary=\"" "\"\n"] 3 (#$ . 2054)])
#@37 Return a default encoding for FILE.
(defalias 'mm-default-file-encoding #[(file) "\301\302\"\204	 \303\207\304\305\306\"!\207" [file string-match "\\.[^.]+$" "application/octet-stream" mailcap-extension-to-mime match-string 0] 4 (#$ . 2287)])
#@38 Return a safer but similar encoding.
(defalias 'mm-safer-encoding #[(encoding) "\301>\203 \302\207\303\207" [encoding (7bit 8bit quoted-printable) quoted-printable base64] 2 (#$ . 2538)])
(defalias 'mm-encode-content-transfer-encoding #[(encoding &optional type) "\302=\203\f \303ed\304#\207\305=\2031 	\306\232\203, eb\210\307\310\311\304#\203, \312\313\304\211#\210\202 \314\315\316\217\207\317>\206K ?\206K \320!\203G \321\322\323\217\207\324\325\"\207" [encoding type quoted-printable quoted-printable-encode-region t base64 "text/plain" search-forward "\n" nil replace-match "\n" error (byte-code "\300ed\"\207" [base64-encode-region] 3) ((error (message "Error while decoding: %s" error) nil)) (7bit 8bit binary) functionp #1=#:G97269 (byte-code "ed\"\207" [encoding] 3) ((error)) message "Unknown encoding %s; defaulting to 8bit"] 4])
#@79 Encode the buffer which contains data of TYPE.
The encoding used is returned.
(defalias 'mm-encode-buffer #[(type) ";\203	 \202 @<\203 \303\236\211A@)\206 \305	!\306 \211\307=\203+ \f\310	\"\210+\207" [type mime-type x encoding bits mm-content-transfer-encoding mm-body-7-or-8 7bit mm-encode-content-transfer-encoding] 4 (#$ . 3397)])
#@26 Insert headers for TYPE.
(defalias 'mm-insert-headers #[(type encoding &optional file) "\303\261\210	\203 \304\305	!\306\261\210\307c\210\310\311\n\"c\210\312c\210	\203) \313\305	!\306\261\210\307c\210\307c\207" [type file encoding "Content-Type: " ";\n	name=\"" file-name-nondirectory "\"" "\n" format "Content-Transfer-Encoding: %s\n" "Content-Disposition: inline" ";\n	filename=\""] 3 (#$ . 3753)])
#@62 Return a CTE suitable for TYPE to encode the current buffer.
(defalias 'mm-content-transfer-encoding #[(type) "\302\303\215)\207" [mm-content-transfer-encoding-defaults rules found (byte-code "\205B \305\211@@)\n\"\2039 \306\307@\211A@)\310=\203# \311 \202* @\211A@)\f\2035 \312!\2026 )\"\210\211A@\210\202  \207" [rules x type encoding mm-use-ultra-safe-encoding string-match throw found qp-or-base64 mm-qp-or-base64 mm-safer-encoding] 5)] 2 (#$ . 4166)])
(defalias 'mm-qp-or-base64 #[nil "\212de\302\\^\303eb\210\304	w\210`	W\203# T\305u\210\304	w\210\202 \306_	eZW\2043 \305U\2037 \307\2028 \310+\207" [n8bit limit 2000 0 " -\n	" 1 6 quoted-printable base64] 3])
(provide 'mm-encode)
