;ELC   
;;; Compiled by rms@psilocin.ai.mit.edu on Tue Aug 18 03:26:58 1998
;;; from file /gd/gnu/emacs/lisp/mail/rmailout.el
;;; in Emacs version 20.2.98.3
;;; with bytecomp version 2.48
;;; 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 "`rmailout.el' was compiled for Emacs 19.29 or later"))

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


(require 'rmail)
#@344 *Alist matching regexps to suggested output Rmail files.
This is a list of elements of the form (REGEXP . NAME-EXP).
The suggestion is taken if REGEXP matches anywhere in the message buffer.
NAME-EXP may be a string constant giving the file name to use,
or more generally it may be any kind of expression that returns
a file name as a string.
(custom-declare-variable 'rmail-output-file-alist 'nil '(#$ . -627) :type '(repeat (cons regexp (choice :value "" (string :tag "File Name") sexp))) :group 'rmail-output)
#@585 Append the current message to an Rmail file named FILE-NAME.
If the file does not exist, ask if it should be created.
If file is being visited, the message is appended to the Emacs
buffer visiting that file.
If the file exists and is not an Rmail file, the message is
appended in inbox format, the same way `rmail-output' does it.

The default file name comes from `rmail-default-rmail-file',
which is updated to the name you use in this command.

A prefix argument N says to output N consecutive messages
starting with the current one.  Deleted messages are skipped and don't count.
(defalias 'rmail-output-to-rmail-file #[(file-name &optional count) "\204 \306\307	\310\n!\"\311	!\203 \312	!\204 \313	\"\207\314 \210\315	!\316	!\204\\ \317	!\204\\ \320\321	\322Q!\203X \323	!\212q\210\324 \210\325\326ed	\327\306%\210*\330!\210)\202\\ \331\332!\210\333V\205\236\325\334\216\335+!\203t \327\336\337\325\"\210\214~\210\212\316	!p\340+!T\341+!T<\206\214 \342=>?@\211A\204\322 B\203\307 pC\343\344!q\210\345C?>#\210\346 \210\347ed	#\210Cq\210\330\350\344!!\210)\202{\347?>	#\210\202{Ap=\203\335 \331\351!\210Aq\210\325\352\353!\205\352 +DED\203eF\204G\203\354\327!\210\314 \210~\210dd}\210\345@?>#\210eb\210~\210\355\356!\210`d}\210\346 \210\357\327!\210\360 \203]HI\361 \203L\362 J\212\363\216\364K!\210IH\365 \210,\202Y\212Kq\210IH\365 \210*\366 \210)\367D!\210\202ze\370 T}\210db\210\345@?>#\210\346 \210*.\336\371\327\"\210*SL\203\221\372 \210\202\\ \333V\203\\ \373\306!\210\202\\ \207" [count file-name rmail-default-rmail-file file-buffer require-final-newline redelete 1 expand-file-name file-name-directory file-readable-p mail-file-babyl-p rmail-output rmail-maybe-set-message-counters abbreviate-file-name find-buffer-visiting file-exists-p yes-or-no-p "\"" "\" does not exist, create it? " create-file-buffer rmail-insert-rmail-file-header nil write-region t kill-buffer error "Output file does not exist" 0 ((byte-code "\203	 \301\302\303\"\210\301\207" [redelete rmail-set-attribute "deleted" t] 3)) rmail-message-deleted-p rmail-set-attribute "deleted" rmail-msgbeg rmail-msgend emacs-mule-unix get-buffer-create " rmail-out-temp" insert-buffer-substring rmail-delete-unwanted-fields append-to-file get-buffer "Can't output message to same file it's already in" boundp rmail-current-message auto-save-mode search-backward "\n" rmail-count-new-messages rmail-summary-exists rmail-summary-displayed selected-window ((select-window window)) pop-to-buffer rmail-update-summary rmail-maybe-display-summary rmail-show-message buffer-size "filed" rmail-delete-forward rmail-next-undeleted-message rmail-file-coding-system coding-system-for-write end beg cur buf rmail-fields-not-to-output obuf msg buffer-read-only buffer-auto-save-file-name auto-save-default rmail-total-messages total window rmail-summary-buffer rmail-delete-after-output] 7 (#$ . 1147) (let ((default-file (let (answer tail) (setq tail rmail-output-file-alist) (while (and tail (not answer)) (save-excursion (goto-char (point-min)) (if (re-search-forward (car (car tail)) nil t) (setq answer (eval (cdr (car tail))))) (setq tail (cdr tail)))) (expand-file-name (or answer rmail-default-rmail-file))))) (let ((read-file (expand-file-name (read-file-name (concat "Output message to Rmail file: (default " (file-name-nondirectory default-file) ") ") (file-name-directory default-file) default-file) (file-name-directory default-file)))) (setq rmail-default-rmail-file (if (file-directory-p read-file) (expand-file-name (file-name-nondirectory default-file) read-file) read-file))) (list rmail-default-rmail-file (prefix-numeric-value current-prefix-arg)))])
#@75 *Regexp describing fields to exclude when outputting a message to a file.
(custom-declare-variable 'rmail-fields-not-to-output 'nil '(#$ . -4860) :type '(choice (const :tag "None" nil) regexp) :group 'rmail-output)
(defalias 'rmail-delete-unwanted-fields #[(&optional not-rmail) "\2059 \212eb\210	\204 \303\304\305\306#\2058 \303\307\305\306#\2058 \310 eb\210\311\n\306#\2057 \312y\210`\313y\210`|\210\202\" ))\207" [rmail-fields-not-to-output not-rmail end search-forward "\n*** EOOH ***\n" nil t "\n\n" point-marker re-search-forward 0 1] 4])
#@737 Append this message to system-inbox-format mail file named FILE-NAME.
A prefix argument N says to output N consecutive messages
starting with the current one.  Deleted messages are skipped and don't count.
When called from lisp code, N may be omitted.

If the pruned message header is shown on the current message, then
messages will be appended with pruned headers; otherwise, messages
will be appended with their original headers.

The default file name comes from `rmail-default-file',
which is updated to the name you use in this command.

The optional third argument NOATTRIBUTE, if non-nil, says not
to set the `filed' attribute, and not to display a message.

The optional fourth argument FROM-GNUS is set when called from GNUS.
(defalias 'rmail-output #[(file-name &optional count noattribute from-gnus) "\204 \306\307	\n\205 \310\n!\"\311	!\203\" \312	!\203\" \313	\"\207p\314\315\316!?\205? \212\214\317\f!d}\210eb\210\306y\210g\320U*\321\211\2116789:;<\322V\203R\204z \212\214~\210\317\f!b\210`7\323\324!\2107`}\210\325\326!6\325\327!*\2129q\210\330 \210\331;!\210\332\314!\210\333c\210eb\2106\203\237 6\333\261\210\202\274 \334\335\325\336!\206\264 \325\337!\206\264 \325\340!\206\264 \341!\342\343 \333\261\210\203\306 \344\333\261\210\321:\323\345\321\314#\203\332 \346u\210\347c\210\202\311 )\350ed	\314=\205\346 \351%\210)=\204\372 >\352\232\203\372 \353\354\314\"\210S\204Q ?\203\355 \202\322V\205\356\306!<Z@\211A\203(8\203(\357 \210\322V\203NA\204N\360\212;q\210\361\362@\211\306U\203G\363\202H\364#)!\210\322*\202Q \3659!.\207" [count file-name rmail-default-file from-gnus rmail-current-message mime-version 1 expand-file-name file-name-directory file-readable-p mail-file-babyl-p rmail-output-to-rmail-file t get-buffer-create " rmail-output" rmail-msgbeg 48 nil 0 search-forward "\n*** EOOH ***\n" mail-fetch-field "Mail-From" "MIME-Version" erase-buffer insert-buffer-substring rmail-delete-unwanted-fields "\n" "From " mail-strip-quoted-names "from" "really-from" "sender" "unknown" " " current-time-string "MIME-Version: " "\nFrom " -5 62 write-region nomsg rmail-mode rmail-set-attribute "filed" rmail-delete-forward rmail-next-undeleted-message rmail-toggle-header error format "Only %d message%s appended" "" "s" kill-buffer mail-from header-beginning original-headers-p tembuf case-fold-search rmailbuf orig-count noattribute major-mode rmail-delete-after-output num-appended next-message-p] 9 (#$ . 5416) (let ((default-file (let (answer tail) (setq tail rmail-output-file-alist) (while (and tail (not answer)) (save-excursion (goto-char (point-min)) (if (re-search-forward (car (car tail)) nil t) (setq answer (eval (cdr (car tail))))) (setq tail (cdr tail)))) (or answer rmail-default-file)))) (list (setq rmail-default-file (let ((read-file (read-file-name (concat "Output message to Unix mail file: (default " (file-name-nondirectory default-file) ") ") (file-name-directory (expand-file-name default-file)) (expand-file-name default-file)))) (if (file-directory-p read-file) (expand-file-name (file-name-nondirectory default-file) read-file) (expand-file-name (or read-file (file-name-nondirectory default-file)) (file-name-directory default-file))))) (prefix-numeric-value current-prefix-arg)))])
#@122 Write this message body to the file FILE-NAME.
FILE-NAME defaults, interactively, from the Subject field of the message.
(defalias 'rmail-output-body-to-file #[(file-name) "\304	\205	 \305	!\"\212eb\210\306\307!\210\310!\203& \311\312\313\"!\204& \314\315!\210\316`d#\210\n\317\232\2037 \320\321\322\"\210)\205> \323 \207" [file-name rmail-default-body-file major-mode rmail-delete-after-output expand-file-name file-name-directory search-forward "\n\n" file-exists-p y-or-n-p message "File %s exists; overwrite? " error "Operation aborted" write-region rmail-mode rmail-set-attribute "stored" t rmail-delete-forward] 4 (#$ . 8722) (let ((default-file (or (mail-fetch-field "Subject") rmail-default-body-file))) (list (setq rmail-default-body-file (read-file-name "Output message body to file: " (and default-file (file-name-directory default-file)) default-file nil default-file))))])
