;ELC   
;;; Compiled by amu@quiche-lorraine.mit.edu on Thu Jan  6 19:18:03 2000
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.8.3/lisp/mml.el
;;; in Emacs version 20.4.1
;;; with bytecomp version 2.56
;;; 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 "`mml.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\"\207" [require mm-util mm-bodies mm-encode mm-decode autoload message-make-message-id "message"] 3)
#@341 *Alist of multipart generation functions.

Each entry has the form (NAME . FUNCTION), where
NAME: is a string containing the name of the part (without the 
leading "/multipart/"),
FUNCTION: is a Lisp function which is called to generate the part.

The Lisp function has to supply the appropriate MIME headers and the
contents of this part.
(defvar mml-generate-multipart-alist nil (#$ . -812))
(byte-code "\304\302!\204C \305!\306\307\310	#\210\306\311\312	#\210\306\313\314	#\210\306\315\316	#\210\306\317\316	#\210\306\320\321	#\210\306\322\321	#\210\306\323\321	#\210\306\324\321	#\210	)\302B\304\207" [emacs-lisp-mode-syntax-table table mml-syntax-table current-load-list boundp copy-syntax-table modify-syntax-entry 92 "/" 60 "(" 62 ")" 64 "w" 47 61 " " 42 59 39] 4)
#@269 A function called to suggest a boundary.
The function may be called several times, and should try to make a new
suggestion each time.  The function is called with one parameter,
which is a number that says how many times the function has been
called for this message.
(defvar mml-boundary-function 'mml-make-boundary (#$ . 1596))
#@277 A list of symbols, each of which disables some warning.
`unknown-encoding': always send messages contain characters with
unknown encoding; `use-ascii': always use ASCII for those characters
with unknown encoding; `multipart': always send messages with more than
one charsets.
(defvar mml-confirmation-set nil (#$ . 1933))
#@46 Parse the current buffer as an MML document.
(defalias 'mml-parse #[nil "eb\210\302 \303\216\304	!\210\305 *\207" [table mml-syntax-table syntax-table ((set-syntax-table table)) set-syntax-table mml-parse-1] 2 (#$ . 2261)])
#@46 Parse the current buffer as an MML document.
(defalias 'mml-parse-1 #[nil "\306\211\211\211\211\211\211!m\204\323 \307\310!\204\323 \307\311!\203, \312 \313 \244!B!\202 \307\314!\203B \312 \303\315 BC\244!B!\202 \307\316!\203N \312 \202T \317\320D\321`\315 \322\f`\"\306\n>\203\221 \323\">\204q \324\325!\203\215 \300\">\206{ \324\326!\211\203\210 \327\306\n\"\202\221 \306\202\221 \330\331!\210\nG\332W\203\246 \303BC\244!B!\202 \333\f`$#	\203\310 \334\">\204\310 \324\335\336#G\"!\204\310 \330\337!\210#!\244!)\202 m\204\332 \340y\210!\237.\207" [use-ascii warn charsets contents point tag nil looking-at "<#/multipart" "<#multipart" mml-read-tag mml-parse-1 "<#external" mml-read-part "<#part" part (type . "text/plain") t mm-find-mime-charset-region unknown-encoding y-or-n-p "Warning: You message contains characters with unknown encoding. Really send?" "Use ASCII as charset?" delq error "Edit your message to remove those characters" 2 mml-parse-singlepart-with-multiple-charsets multipart format "Warning: Your message contains %d parts.  Really send? " "Edit your message to use only one charset" 1 struct mml-confirmation-set nstruct] 7 (#$ . 2492)])
(defalias 'mml-parse-singlepart-with-multiple-charsets #[(orig-tag beg end &optional use-ascii) "\212	}\210eb\210\306\307 !\206 \n\205 \310\311\211\211\211\211m\204\275 \306\307 !\211\310=\204\213 \n\203; \203\213 =\204\213 \310=\203W \311\311\311\202\213 \312\313\314\206j \f\206j \206j `\"BC\"B\206\200 \f\206\200 \206\200 `\311\311\311g\315>\203\227 `T\202\267 g\316=\203\243 `T\202\267 g\316=\203\267 o\204\267 `Sf\316=\203\267 `\317u\210\202\" `U\204\323 \312\313\314`\"BC\"B.\207" [beg end use-ascii paragraph newline space mm-mime-charset mm-charset-after us-ascii nil append contents buffer-substring-no-properties (32 9) 10 1 struct charset current orig-tag] 6])
#@37 Read a tag and return the contents.
(defalias 'mml-read-tag #[nil "\304\211\211\211\305u\210\306`\307\310!\210`\"\311\304w\210\312\313!\204O \306`\307\310!\210`\"\314\304w\210\306`\307\310!\210`\"\315\316\"\203@ \317\310\"\320	!BB\311\304w\210\202 \310u\210\311\304w\210\320\n!\237,B\207" [val elem name contents nil 2 buffer-substring-no-properties forward-sexp 1 " 	\n" looking-at ">" "= 	\n" string-match "^\"\\(.*\\)\"$" match-string intern] 4 (#$ . 4433)])
#@82 Return the buffer up till the next part, multipart or closing part or multipart.
(defalias 'mml-read-part #[nil "`\301\302!\203 \303y\210\304\305\306\307#\2038 \310\311\224\"\303\224\203% \312\313!\314\232\203, \311\224b\210\202= \301\302!\203= \303y\210\202= \310db\")\207" [beg looking-at "[ 	]*\n" 1 re-search-forward "<#\\(/\\)?\\(multipart\\|part\\|external\\)." nil t buffer-substring-no-properties 0 match-string 2 "multipart"] 4 (#$ . 4916)])
(byte-code "\304\300!\204 \305\300	B\304\302!\204 \306\302	B\304\303!\204  \307\303	B\305\207" [mml-boundary current-load-list mml-base-boundary mml-multipart-number boundp nil "-=-=" 0] 2)
#@60 Generate a MIME message based on the current MML document.
(defalias 'mml-generate-mime #[nil "\303 \304\211\2055 \305\306\307!!\310\216r\nq\210	@:\203* 	G\311U\203* \312	@!\210\2022 \312\313\314D	\244!\210\315 +*\207" [mml-multipart-number cont #1=#:temp-buffer mml-parse 0 get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) 1 mml-generate-mime-1 multipart (type . "mixed") buffer-string] 4 (#$ . 5575)])
(defalias 'mml-generate-mime-1 #[(cont) "@\306=\203m\307\211\211\211\211\301\236A\206 \310\311	\312\"@\313\235\203\222 \314\315\316!!@\317\216r@q\210\320\236A\203C \321\320\236A!\210\202\200 \302\236A\211\203\\ \322\236A\323\232\204\\ \324\n!\210\202\200 \214``}\210\325\236Ac\210eb\210\326\327\307\330#\203 \331\224\332\\\331\224\333\\|\210\202j )\334 \335\304\236A\"\336 +\202_\337\340A\"\204\240 \341\342!\204\364 \314\315\316!!B\343\216rBq\210\320\236A\203\277 \321\320\236A!\210\202\351 \302\236A\211\203\343 \322\236A\323\232\204\343 CD\324\n\307\211\211\211\330&\210)\202\351 \325\236Ac\210\344	!\336 +\202_\345\342!\307EF\346\216\347\342\307\"\210\314\315\316!!E\350\216rEq\210C\211\211GDH\320\236A\203,\321\320\236A!\210\202V\302\236A\211\203P\322\236A\323\232\204PCD\324\n\307\211\211\211\330&\210)\202V\325\236Ac\210\344	!\336 .\351	\f$\210\352c\210c-\207@\353=\203\354c\210\355\356\"\357\236A/I/\203\315\360/!\211/;\203\237\361\362\363/\"\364\"\210\202\315\361\362\363\365\332/8!\"\362\366/A@\"\362\367\370\332/8!\"#\210\361\371/@\372\235\203\311\373\202\312\374P!\210I\203\327\375\376\"\210*\377c\210\201M \301\236A\352\261\210\201N \201O  \352\261\210\201P \304\236A\206\376\201Q \261\210\377c\210\325\236Ac\210\352c\207@\201R =\203t\301\236A\206 \201S \201T 	J\"\211K\2036KA!\202r\201U !L\201V \201W 	L#c\210AA\203g\201X L\352\261\210\201Y \211A@!\210\202M\201X L\201Z \261)*\207\201[ \201\\ \"\207" [cont type filename charset encoding coded part nil "text/plain" split-string "/" ("text" "message") get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1=#:temp-buffer buffer-name kill-buffer] 2)) buffer insert-buffer-substring nofile "yes" mm-insert-file-contents contents re-search-forward "<#!+/?\\(part\\|multipart\\|external\\)" t 0 2 3 mm-encode-body mm-body-encoding buffer-string string-match "XEmacs\\|Lucid" boundp enable-multibyte-characters ((byte-code "\301!\203\n \302!\210\301\207" [#2=#:temp-buffer buffer-name kill-buffer] 2)) mm-encode-buffer default-value ((byte-code "\301\302\"\207" [#3=#:multibyte set-default enable-multibyte-characters] 3)) set-default ((byte-code "\301!\203\n \302!\210\301\207" [#4=#:temp-buffer buffer-name kill-buffer] 2)) mml-insert-mime-headers "\n" external "Content-Type: message/external-body" mml-parameter-string (expiration size permission) name mml-parse-file-name mml-insert-parameter mail-header-encode-parameter "name" "access-type=local-file" file-name-nondirectory "site" "directory" file-name-directory "access-type=" ("ftp@" "anonymous@") "anon-ftp" "ftp" mml-insert-parameter-string (expiration size permission) "\n\n" #1# emacs-version #2# mm-binary-coding-system coding-system-for-read #4# #3# coding-system-for-write buffer-file-coding-system parameters mml-generate-multipart-alist handler mml-boundary "Content-Type: " "Content-ID: " message-make-message-id "Content-Transfer-Encoding: " "binary" multipart "mixed" assoc mml-compute-boundary format "Content-Type: multipart/%s; boundary=\"%s\"\n" "\n--" mml-generate-mime-1 "--\n" error "Invalid element: %S"] 9])
#@55 Return a unique boundary that does not exist in CONT.
(defalias 'mml-compute-boundary #[(cont) "	T\211!\303\304\215\203 \n)\207" [mml-boundary-function mml-multipart-number mml-boundary not-unique (mml-compute-boundary-1 cont)] 3 (#$ . 9297)])
(defalias 'mml-compute-boundary-1 #[(cont) "\306	@\307=\203d \310\311\312!!\313\216r\nq\210\314	\236A\203& \315\314	\236A!\210\202E \300	\236A\211\203? \316	\236A\317\232\204? \320!\210\202E \321	\236Ac\210eb\210\322\323\324!P\306\325#\203` \fT\211!\326\327\306\"\210+\202r 	@\330=\203r \331\332	AA\"\210)\325\207" [filename cont #1=#:temp-buffer mml-boundary mml-boundary-function mml-multipart-number nil part get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) buffer insert-buffer-substring nofile "yes" mm-insert-file-contents contents re-search-forward "^--" regexp-quote t throw not-unique multipart mapcar mml-compute-boundary-1] 4])
(defalias 'mml-make-boundary #[(number) "\302\303\246\304\"\305V\203 \306\307\"\202 \310	Q\207" [number mml-base-boundary make-string 60 61 17 format "%x" ""] 4])
(defalias 'mml-make-string #[(num string) "\303	S\211\304U\204 \nP\202 )\207" [out num string "" 0] 2])
(defalias 'mml-insert-mime-headers #[(cont type charset encoding) "\306\211\211\307\310\"\f\204 \n\204 \311\232\204A \f:\203\" \312\313!\210\314\261\210\f\2035 \315\316\317\320\f!\"\261\210\n\203> \321\322\"\210\323c\210\307\324\"\301\236A\211\204S \n\203h \325	\206Y \326\261\210\n\203e \321\327\"\210\323c\210\330=\204v \331\332\"c\210\300\236A\211\205\206 \333\334!\323\261+\207" [description disposition parameters cont charset type nil mml-parameter-string (name access-type expiration size permission) "text/plain" error "Can't encode a part with several charsets." "Content-Type: " "; " mail-header-encode-parameter "charset" symbol-name mml-insert-parameter-string (name access-type expiration size permission) "\n" (filename creation-date modification-date read-date) "Content-Disposition: " "inline" (filename creation-date modification-date read-date) 7bit format "Content-Transfer-Encoding: %s\n" "Content-Description: " mail-encode-encoded-word-string encoding] 5])
(defalias 'mml-parameter-string #[(cont types) "\305\306\211\211A@\211\2030 \f\236A\211\203 \307=\203# \310	!\n\311\312\313!	\"Q\202 \nG\314U?\2059 \n+\207" [type value string types cont "" nil filename file-name-nondirectory "; " mail-header-encode-parameter symbol-name 0] 5])
(defalias 'mml-insert-parameter-string #[(cont types) "\304\211\n\211A@\211\205- \236A\211\203 \305=\203! \306	!\307\310\311!	\"!\210\202 *\207" [type value types cont nil filename file-name-nondirectory mml-insert-parameter mail-header-encode-parameter symbol-name] 4])
(byte-code "\301B\302B\301\207" [current-load-list ange-ftp-path-format efs-path-regexp] 2)
(defalias 'mml-parse-file-name #[(path) "\303\300!\203 \304	\"\202 \303\302!\203* \304\n@!\203* \305\306	\"\305\307	\"	\307\225T\310OE\207	\207" [efs-path-regexp path ange-ftp-path-format boundp string-match match-string 1 2 nil] 5])
#@50 Insert BUFFER at point and quote any MML markup.
(defalias 'mml-insert-buffer #[(buffer) "\214``}\210\301!\210\302ed\"\210db)\207" [buffer insert-buffer-substring mml-quote-region] 3 (#$ . 12475)])
#@68 Translate the current buffer (which should be a message) into MML.
(defalias 'mime-to-mml #[nil "\214\301 \210\302ed\"\210)\303\304!eb\210\305\306\307\304#\210`d|\210@;\203( \310!\210\202- \310\304\"\210\311!)\207" [handles message-narrow-to-head mail-decode-encoded-word-region mm-dissect-buffer t search-forward "\n\n" nil mml-insert-mime mm-destroy-parts] 4 (#$ . 12680)])
#@48 Translate the current buffer from MML to MIME.
(defalias 'mml-to-mime #[nil "\300 \210\214\301 \210\302 )\207" [message-encode-message-body message-narrow-to-headers-or-head mail-encode-encoded-word-buffer] 1 (#$ . 13067)])
(defalias 'mml-insert-mime #[(handle &optional no-markup) "\306\211\n@;\2047 \n\307\n\211@;\203 \n@\202 \nA@@)\310\"@)\311\232\211\2047 \212\312\313!\211q\210\314\n!\210)\204A \315\n	#\210\n@;\203R \316\317\nA\"\210\320c\202o 	\203m \321\n!\322\nA@\304\"\323\f\"c\210*db\202o \324c*\207" [buffer textp handle no-markup charset text nil split-string "/" "text" generate-new-buffer " *mml*" mm-insert-part mml-insert-mml-markup mapcar mml-insert-mime "<#/multipart>\n" mm-get-part mail-content-type-get mm-decode-string "<#/part>\n"] 5])
#@43 Take a MIME handle and insert an MML tag.
(defalias 'mml-insert-mml-markup #[(handle &optional buffer nofile) "@;\203% \305\306\211@;\203 @\202 A@@)\307\"A@)\310\261\207\311\211@;\2033 @\2027 A@@)\261\210\312A@A\3138A\"\314\211\203b \n@\315\316	@!\317	A\320\261\210\nA\211\204L *\3138\203q \321\3138@\261\210\203} \322\323!\320\261\210\f\203\204 \324c\210\3258\203\222 \326\3258\320\261\210\310c\207" [handle elem #1=#:--dolist-temp--82127 buffer nofile "<#multipart type=" split-string "/" ">\n" "<#part type=" append 4 nil " " symbol-name "=\"" "\"" " disposition=" " buffer=\"" buffer-name " nofile=yes" 5 " description=\""] 7 (#$ . 13846)])
#@34 Insert PARAMETERS in a nice way.
(defalias 'mml-insert-parameter #[(&rest parameters) "\304\211\203, \n@\305c\210`\306	\261\210i\307V\203$ b\210\310c\210\304\210)\nA\211\204 *\304\207" [parameters param #1=#:--dolist-temp--82128 point nil ";" " " 71 "\n "] 3 (#$ . 14528)])
(byte-code "\304\302!\204K \305 \305 \306	\307\310#\210\306	\311\312#\210\306	\313\314#\210\306	\315\316#\210\306	\317\320#\210\306	\321\322#\210\306	\323\324#\210\306	\325\326#\210\306	\327\330#\210\306\331	#\210*\302B\304\207" [main map mml-mode-map current-load-list boundp make-sparse-keymap define-key "f" mml-attach-file "b" mml-attach-buffer "e" mml-attach-external "q" mml-quote-region "m" mml-insert-multipart "p" mml-insert-part "v" mml-validate "P" mml-preview "n" mml-narrow-to-part "\355"] 4)
#@2 
(defvar mml-menu nil (#$ . 15330))
(easy-menu-do-define 'mml-menu mml-mode-map "" '("MML" ("Attach" ["File" mml-attach-file t] ["Buffer" mml-attach-buffer t] ["External" mml-attach-external t]) ("Insert" ["Multipart" mml-insert-multipart t] ["Part" mml-insert-part t]) ["Narrow" mml-narrow-to-part t] ["Quote" mml-quote-region t] ["Validate" mml-validate t] ["Preview" mml-preview t]))
#@29 Minor mode for editing MML.
(defvar mml-mode nil (#$ . 15723))
#@46 Minor mode for editing MML.

\{mml-mode-map}
(defalias 'mml-mode #[(&optional arg) "\305\301!\204\f 	?\202 \306!\307VL\2031 \305\301!\310L\210\301\n\236\204% \311\nB\301\236\2041 \301\fBB\312\313!\207" [arg mml-mode minor-mode-alist minor-mode-map-alist mml-mode-map make-local-variable prefix-numeric-value 0 t (mml-mode " MML") run-hooks mml-mode-hook] 3 (#$ . 15792) "P"])
(defalias 'mml-minibuffer-read-file #[(prompt) "\302\303\211\304$\305	!\203 \306\307	\"\210\310	!\204 \306\311	\"\210\312	!\204( \306\313	\"\210	)\207" [prompt file read-file-name nil t file-directory-p error "%s is a directory, cannot attach" file-exists-p "No such file: %s" file-readable-p "Permission denied: %s"] 5])
(defalias 'mml-minibuffer-read-type #[(name &optional default) "\206 \305	!\206 \306\307\310\311\"\312\313\314\312\315\n\"\316\317\312\320\"\"\244!\"\"\211\321\232\204. \f\202/ *\207" [default name mailcap-mime-extensions mailcap-mime-data string mm-default-file-encoding "application/octet-stream" completing-read format "Content type (default %s): " mapcar list mm-delete-duplicates #[(m) "A\207" [m] 1] apply nconc #[(l) "\301\302\303\304A\"\"\207" [l delq nil mapcar #[(m) "\301A\236A\302	\303\"A@\304\232?\205 	)\207" [m type split-string "/" "*"] 3]] 5] ""] 12])
(defalias 'mml-minibuffer-read-description #[nil "\301\302!\303\304\"\203 \305)\207" [description read-string "One line description: " string-match "\\`[ 	]*\\'" nil] 3])
#@35 Quote the MML tags in the region.
(defalias 'mml-quote-region #[(beg end) "\212\214	}\210eb\210\302\303\304\305#\205 \306\224\307\\b\210\310c\210\202	 *\207" [beg end re-search-forward "<#/?!*\\(multipart\\|part\\|external\\)" nil t 0 2 "!"] 4 (#$ . 17265) "r"])
#@48 Insert an MML tag described by NAME and PLIST.
(defalias 'mml-insert-tag #[(name &rest plist) "9\203	 \304!\305\261\210	\2038 	\211A@	\211A@\n\2034 \306\307\n\"\203- \310\n!\311\312\n#c\210*\202 \313c\207" [name plist value key symbol-name "<#" string-match "[\"\\~/* 	\n]" prin1-to-string format " %s=%s" ">\n"] 4 (#$ . 17536)])
#@54 Insert an empty MML tag described by NAME and PLIST.
(defalias 'mml-insert-empty-tag #[(name &rest plist) "9\203	 \302!\303\304	#\210\305\306\261\207" [name plist symbol-name apply mml-insert-tag "<#/" ">\n"] 4 (#$ . 17884)])
#@325 Attach a file to the outgoing MIME message.
The file is not inserted or encoded until you send the message with
`\[message-send-and-exit]' or `\[message-send]'.

FILE is the name of the file to attach.  TYPE is its content-type, a
string of the form "type/subtype".  DESCRIPTION is a one-line
description of the attachment.
(defalias 'mml-attach-file #[(file &optional type description) "\303\304\300\305	\306\307\302\n&	\207" [type file description mml-insert-empty-tag part filename disposition "attachment"] 10 (#$ . 18123) (let* ((file (mml-minibuffer-read-file "Attach file: ")) (type (mml-minibuffer-read-type file)) (description (mml-minibuffer-read-description))) (list file type description))])
#@95 Attach a buffer to the outgoing MIME message.
See `mml-attach-file' for details of operation.
(defalias 'mml-attach-buffer #[(buffer &optional type description) "\303\304\300\301	\305\306\302\n&	\207" [type buffer description mml-insert-empty-tag part disposition "attachment"] 10 (#$ . 18834) (let* ((buffer (read-buffer "Attach buffer: ")) (type (mml-minibuffer-read-type buffer "text/plain")) (description (mml-minibuffer-read-description))) (list buffer type description))])
#@132 Attach an external file into the buffer.
FILE is an ange-ftp/efs specification of the part location.
TYPE is the MIME type to use.
(defalias 'mml-attach-external #[(file &optional type description) "\303\304\300\305	\306\307\302\n&	\207" [type file description mml-insert-empty-tag external name disposition "attachment"] 10 (#$ . 19321) (let* ((file (mml-minibuffer-read-file "Attach external file: ")) (type (mml-minibuffer-read-type file)) (description (mml-minibuffer-read-description))) (list file type description))])
(defalias 'mml-insert-multipart #[(&optional type) "\204 \301\302\303\300#\210\304y\207" [type "mixed" mml-insert-empty-tag "multipart" -1] 4 nil (list (completing-read "Multipart type (default mixed): " '(("mixed") ("alternative") ("digest") ("parallel") ("signed") ("encrypted")) nil nil "mixed"))])
(defalias 'mml-insert-part #[(&optional type) "\301\302\300\303\304%\210\305y\207" [type mml-insert-tag part disposition "inline" -1] 6 nil (list (mml-minibuffer-read-type ""))])
#@89 Display current buffer with Gnus, in a new buffer.
If RAW, don't highlight the article.
(defalias 'mml-preview #[(&optional raw) "p\305\306	\203\f \307\202 \310\311 P!!\210\312 \210\313!\210\314\315\316\n!\317Q\320\321#\203+ \322\317!\210\323 \210	\204< \324\325!\210\326\327 \210)\330 \210\321eb)\207" [buf raw mail-header-separator gnus-newsgroup-name buffer-read-only switch-to-buffer get-buffer-create "*Raw MIME preview of " "*MIME preview of " buffer-name erase-buffer insert-buffer re-search-forward "^" regexp-quote "\n" nil t replace-match mml-to-mime run-hooks gnus-article-decode-hook "dummy" gnus-article-prepare-display fundamental-mode] 4 (#$ . 20338) "P"])
#@36 Validate the current MML document.
(defalias 'mml-validate #[nil "\300 \207" [mml-parse] 1 (#$ . 21021) nil])
(provide 'mml)
