;ELC ;;; compiled by jwz@thalidomide on Thu Apr 14 03:47:36 1994 ;;; from file /th/jwz/emacs19/lisp/modes/sendmail.el ;;; emacs version 19.10 Lucid (beta14). ;;; bytecomp version 2.23; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (defvar mail-self-blind nil "\ Non-nil means insert BCC to self in messages to be sent. This is done when the message is initialized, so you can remove or alter the BCC field to override the default.") (defvar mail-interactive nil "\ Non-nil means when sending a message wait for and display errors. nil means let mailer mail back a message to report errors.") (defvar rmail-ignored-headers (byte-code "#Q!" [purecopy "^\\(" mapconcat identity ("Sender:" "References:" "Return-Path:" "Received:" "[^: \n]*Message-ID:" "Errors-To:" "Path:" "Expires:" "Xref:" "Lines:" "Approved:" "Distribution:" "Content-Length:" "Mime-Version:" "Content-Type:" "Content-Transfer-Encoding:" "X400-Received:" "X400-Originator:" "X400-Mts-Identifier:" "X400-Content-Type:" "Content-Identifier:" "Status:" "Summary-Line:" "X-Attribution:" "Via:" "Sent-Via:" "Mail-From:" "Origin:" "Comments:" "Originator:" "NF-ID:" "NF-From:" "Posting-Version:" "Posted:" "Posted-Date:" "Date-Received:" "Relay-Version:" "Article-I\\.D\\.:" "NNTP-Version:" "NNTP-Posting-Host:" "X-Mailer:" "X-Newsreader:" "News-Software:" "X-Received:" "X-References:" "X-Envelope-To:" "X-VMS-" "Remailed-") "\\|" "\\)"] 6) "\ *Gubbish header fields one would rather not see.") (defvar mail-yank-ignored-headers (byte-code " #ǰ!" [purecopy rmail-ignored-headers "\\|" "^\\(" mapconcat identity ("Resent-To:" "Resent-By:" "Resent-CC:" "To:" "Subject:" "In-Reply-To:") "\\)"] 8) "\ Delete these headers from old message when it's inserted in a reply.") (defvar send-mail-function 'sendmail-send-it "\ Function to call to send the current buffer as mail. The headers are be delimited by a line which is `mail-header-separator'.") (defvar mail-header-separator (purecopy "--text follows this line--") "\ *Line used to separate headers from text in messages being composed.") (defvar mail-archive-file-name nil "\ *Name of file to write all outgoing messages in, or nil for none. Do not use an rmail file here! Instead, use its inbox file.") (defvar mail-default-reply-to nil "\ *Address to insert as default Reply-to field of outgoing messages.") (defvar mail-yank-prefix nil "\ *Prefix insert on lines of yanked message being replied to. nil means use indentation.") (defvar mail-indentation-spaces 3 "\ *Number of spaces to insert at the beginning of each cited line. Used by `mail-yank-original' via `mail-indent-citation'.") (defvar mail-yank-hooks nil "\ Obsolete hook for modifying a citation just inserted in the mail buffer. Each hook function can find the citation between (point) and (mark t). And each hook function should leave point and mark around the citation text as modified. This is a normal hook, misnamed for historical reasons. It is semi-obsolete and mail agents should no longer use it.") (defvar mail-citation-hook nil "\ *Hook for modifying a citation just inserted in the mail buffer. Each hook function can find the citation between (point) and (mark t). And each hook function should leave point and mark around the citation text as modified. If this hook is entirely empty (nil), a default action is taken instead of no action.") (byte-code "!!‡" [boundp mail-abbrevs-loaded nil mail-mode-map] 2) (defvar mail-signature nil "\ *Text inserted at end of mail buffer when a message is initialized. If t, it means to insert the contents of the file `mail-signature-file'.") (defvar mail-insert-signature nil "\ If t, automatically insert the contents of the file `mail-signature-file' before sending a message.") (defvar mail-signature-file "~/.signature" "\ File to be inserted at the end of a message. Usually, this file is called \"~/.signature\".") (defvar mail-signature-inserted nil "\ Non-nil means signature already inserted; don't reinsert it.") (byte-code "!‡" [boundp mail-reply-buffer nil] 2) (defvar mail-send-actions nil "\ A list of actions to be performed upon successful sending of a message.") (defvar mail-default-headers nil "\ *A string containing header lines, to be inserted in outgoing messages. It is inserted before you edit the message, so you can edit or delete these lines.") (defvar mail-mode-syntax-table nil "\ Syntax table used while in mail mode.") (byte-code "\n!#\"M" [mail-mode-syntax-table copy-syntax-table text-mode-syntax-table modify-syntax-entry 37 ". " autoload mail-aliases-setup "mail-abbrevs" mail-setup #[(to subject in-reply-to cc replybuffer actions) "!  ebc `   ͱ d\"* c`  ͱ d\"*ͱͱcͱ ͱͱͱ `  =#!#!  cdbn )  b !!" [make-local-variable mail-signature-inserted nil actions mail-send-actions mail-aliases-setup replybuffer mail-reply-buffer "To: " to " " address-start fill-prefix "\n" fill-region-as-paragraph newline cc "CC: " in-reply-to "In-reply-to: " "Subject: " subject "" mail-default-headers mail-default-reply-to "Reply-to: " mail-self-blind "BCC: " user-login-name mail-archive-file-name "FCC: " mail-header-separator mail-signature t file-exists-p mail-signature-file insert-file-contents set-buffer-modified-p run-hooks mail-setup-hook] 3]] 4) (fset 'mail-mode #[nil " !!!! !\n  !!RR\"" [kill-all-local-variables make-local-variable mail-reply-buffer nil mail-send-actions mail-signature-inserted set-syntax-table mail-mode-syntax-table use-local-map mail-mode-map text-mode-abbrev-table local-abbrev-table mail-mode major-mode "Mail" mode-name t buffer-offer-save paragraph-separate paragraph-start "^" mail-header-separator "$\\|^[ ]*[-_][-_][-_]+$\\|" run-hooks text-mode-hook mail-mode-hook] 4 "\ Major mode for editing mail to be sent. Like Text Mode but with these additional commands: C-c C-s mail-send (send the message) C-c C-c mail-send-and-exit C-c C-f move to a header field (and create it if there isn't): C-c C-f C-t move to To: C-c C-f C-s move to Subj: C-c C-f C-b move to BCC: C-c C-f C-c move to CC: C-c C-t move to message text. C-c C-y mail-yank-original (insert current message, in Rmail). C-c C-w mail-signature (insert signature file). C-c C-q mail-fill-yanked-message (fill what was yanked). C-c C-v mail-sent-via (add a sent-via field for each To or CC) Button3 Popup menu with the above commands." nil]) (byte-code "  \"\"#############" [mail-mode-map make-sparse-keymap set-keymap-parent text-mode-map set-keymap-name define-key "?" describe-mode "" mail-to "" mail-bcc "" mail-fcc "" mail-cc "" mail-subject "" mail-text "" mail-yank-original "" mail-fill-yanked-message "" mail-signature "" mail-send-and-exit "" mail-send button3 mail-mode-menu] 4) (defvar mail-mode-menu '("Sendmail Commands" "Sending Mail:" "----" ["Send and Exit" mail-send-and-exit t] ["Send Mail" mail-send t] "----" "Go to Field:" "----" ["To:" mail-to t] ["Subject:" mail-subject t] ["CC:" mail-cc t] ["BCC:" mail-bcc t] ["Text" mail-text t] "----" "Miscellaneous Commands:" "----" ["Yank Original" mail-yank-original t] ["Fill Yanked Message" mail-fill-yanked-message t] ["Insert Signature" mail-signature t] "----" ["Abort" kill-buffer t]) "\ Popup menu called by the function `mail-mode-menu'.") (fset 'mail-mode-menu #[(event) "\n!!É  @! @H= @ @H= @ @H= @ AL??I;!IΊebQ#!?)I,!)" [select-window event-window event nil mail-mode-menu rest fill sig yank vectorp 1 mail-yank-original mail-signature mail-fill-yanked-message 2 mail-reply-buffer mail-signature-file file-exists-p search-forward "\n" mail-header-separator t looking-at "[ \n]*\\'" popup-menu-titles popup-menu] 7 "\ Pop up the mail mode menu, defined by the variable `mail-mode-menu'." "e"]) (fset 'mail-send-and-exit #[(arg) " \n!" [mail-send mail-bury arg] 2 "\ Send message like `mail-send', then, if no errors, exit from mail buffer. Prefix arg means don't delete this window." "P"]) (fset 'mail-dont-send #[(arg) " !" [mail-bury arg] 2 "\ Don't send the message you have been editing. Prefix arg means don't delete this window." "P"]) (fset 'mail-bury #[(arg) "p!p! \"!q )= !)" [other-buffer newbuf bury-buffer arg one-window-p window-buffer next-window selected-window not major-mode rmail-mode delete-window switch-to-buffer] 4 "\ Bury this mail buffer."]) (fset 'mail-send #[nil "! !!\n! ! ҏAs! !!\"! " [buffer-file-name y-or-n-p "Send buffer contents as mail message? " buffer-modified-p "Message already sent; resend? " message "Sending..." mail-signature-inserted mail-insert-signature file-exists-p mail-signature-file mail-signature run-hooks mail-send-hook send-mail-function mail-send-actions nil (byte-code " @@ @A\"" [apply mail-send-actions] 3) ((error)) "Sending...done" set-buffer-modified-p delete-auto-save-file-if-necessary t noninteractive format "Save file %s? " save-buffer] 5 "\ Send the message in the current buffer. If the file named by the variable `mail-signature-file' exists and the variable `mail-insert-signature' is non-nil, that file is inserted at the end. If `mail-insert-signature' is nil, your .signature file will not be inserted unless you do it explicitly with C-c C-w. If `mail-interactive' is non-nil, wait for success indication or error messages, and inform user. Otherwise any failure is reported in a message back to the user from the mailer." nil]) (fset 'sendmail-send-it #[nil "!!ʼnp \nˎ q !dbhUceb!Q!!! eb#`W!lebeb#!eb#!\nq ))ed!\"\n D?#\"\nqeb#!s U?ed{\")." [mail-interactive generate-new-buffer " sendmail errors" 0 " sendmail temp" nil mailbuf delimline case-fold-search tembuf errbuf ((byte-code " ! ! !" [kill-buffer tembuf bufferp errbuf] 2)) erase-buffer insert-buffer-substring 10 re-search-forward "^" regexp-quote mail-header-separator "\n" replace-match backward-char 1 point-marker "\n\n\n*" t "^FCC:" mail-do-fcc "^Subject:[ ]*\n" "" apply call-process-region append boundp sendmail-program "/usr/lib/sendmail" "-oi" "-t" "-f" user-login-name ("-oem" "-odb") "\n\n* *" "; " buffer-size error "Sending...failed to %s"] 11]) (fset 'mail-to #[nil " !" [expand-abbrev mail-position-on-field "To"] 2 "\ Move point to end of To-field." nil]) (fset 'mail-subject #[nil " !" [expand-abbrev mail-position-on-field "Subject"] 2 "\ Move point to end of Subject-field." nil]) (fset 'mail-cc #[nil " \"!c" [expand-abbrev mail-position-on-field "cc" t "to" "\nCC: "] 3 "\ Move point to end of CC-field. Create a CC field if none." nil]) (fset 'mail-bcc #[nil " \"!c" [expand-abbrev mail-position-on-field "bcc" t "to" "\nBCC: "] 3 "\ Move point to end of BCC-field. Create a BCC field if none." nil]) (fset 'mail-fcc #[nil " \"!!" [expand-abbrev mail-position-on-field "fcc" t "to" "\nFCC: " read-file-name "Folder carbon copy: "] 3 "\ Add a new FCC field, with file name completion." nil]) (fset 'mail-position-on-field #[(field &optional soft) "ebQ!ǔeb !Q ##yx bx б*" [nil t case-fold-search end search-forward "\n" mail-header-separator 0 re-search-forward "^" regexp-quote field ":" "^[^ ]" move soft ": "] 4]) (fset 'mail-text #[nil "eb\nQ!" [search-forward "\n" mail-header-separator] 4 "\ Move point to beginning of text field." nil]) (fset 'mail-signature #[(&optional atpoint) "dbx`d|c ; c!!ȉ )" [atpoint " \n" nil "\n\n" mail-signature insert-file-contents expand-file-name mail-signature-file t mail-signature-inserted] 3 "\ Sign letter with contents of `mail-signature-file'." "P"]) (fset 'mail-fill-yanked-message #[(&optional justifyp) "eb\nQ#`d$)" [search-forward "\n" mail-header-separator nil t fill-individual-paragraphs justifyp] 5 "\ Fill the paragraphs of a message yanked into this one. Numeric argument means justify as well." "P"]) (fset 'mail-indent-citation #[nil "`!\" !#b`!W cyq))" [start mail-yank-clear-headers mark t mail-yank-prefix indent-rigidly mail-indentation-spaces 1] 4 "\ Modify text just inserted from a message to be cited. The inserted text should be the region. When this function returns, the region is again around the modified text. Normally, indent each nonblank line `mail-indentation-spaces' spaces. However, if `mail-yank-prefix' is non-nil, insert that prefix on each line."]) (fset 'mail-yank-original #[(arg) "` \" ! !: b!\n\n ! ! ) )l?c+" [mail-reply-buffer get-buffer-window selected-screen reader-window reader-buf start delete-windows-on insert-buffer arg prefix-numeric-value mail-indentation-spaces mail-citation-hook run-hooks mail-yank-hooks mail-indent-citation nil zmacs-regions exchange-point-and-mark 10] 5 "\ Insert the message being replied to, if any (in rmail). Puts point before the text and mark after. Normally, indents each nonblank line ARG spaces (default 3). However, if `mail-yank-prefix' is non-nil, insert that prefix on each line. Just \\[universal-argument] as argument means don't indent, insert no prefix, and don't delete any header fields." "P"]) (byte-code "MM!MMM" [mail-yank-clear-headers #[(start end) "b #`}b#)y`!u`|e))" [start search-forward "\n\n" end t case-fold-search re-search-forward mail-yank-ignored-headers nil 0 "\n[^ ]" -1] 4] mail-do-fcc #[(header-end) "p!  !!eb #`x`{ B єy`|_q  #eb # ڱeb # eb db \"dbc Sb#ucq)ed  @!&&q'=!'=!db #) @!eeTd @$) A -)!." [nil generate-new-buffer " rmail output" t end beg case-fold-search tembuf send-mail-buffer fcc-list markerp header-end error "header-end must be a marker" re-search-forward "^FCC:[ ]*" " " 0 1 erase-buffer insert-buffer-substring "^From[ ]*:" "From: " user-login-name " (" user-full-name ")\n" "^Date[ ]*:" mail-do-fcc-insert-date-header "\nFrom " " " current-time-string "\n" 10 search-forward -5 62 get-file-buffer target-buffer major-mode rmail-mode mail-do-fcc-rmail-internal vm-mode mail-do-fcc-vm-internal write-region file-exists-p kill-buffer] 7] boundp mail-do-fcc-cached-timezone nil mail-do-fcc-insert-date-header #[nil "  \" ŔŕO ǔǕO ɔɕO ʔʕO ˔˕Oȱ   ͱЏ``}$cv`SdS|ve`|edS{ ))" [current-time-string s string-match "\\`\\([A-Z][a-z][a-z]\\) +\\([A-Z][a-z][a-z]\\) +\\([0-9][0-9]?\\) *\\([0-9][0-9]?:[0-9][0-9]:[0-9][0-9]\\) *[0-9]?[0-9]?\\([0-9][0-9]\\)" "Date: " 1 ", " 3 " " 2 5 4 mail-do-fcc-cached-timezone "\n" nil (byte-code " A@; A@ A@ 8 8 ű )" [current-time-zone zoneinfo 3 2 mail-do-fcc-cached-timezone "\n"] 3) ((error)) call-process "date" t -1] 12] mail-do-fcc-rmail-internal #[(buffer) "=!edȎ~db c !c," [major-mode rmail-mode error "this only works in rmail-mode" nil buffer-read-only e b ((byte-code " } " [b e rmail-maybe-set-message-counters] 2)) rmail-total-messages " \n0, unseen,,\n*** EOOH ***" insert-buffer-substring buffer "\n"] 3] mail-do-fcc-vm-internal #[(buffer) "=! =? qebwye`|) deZVĉ   eē dē Ў~dbp !\" !p !\"T! ." [major-mode vm-mode error "this only works in vm-mode" nil vm-folder-type From_ foreign-folder-p buffer-read-only buffer "\n" buffer-size vm-sr-max vm-sr-min vm-sr-clip make-marker ((byte-code "~ \n} É\nÉÇ" [vm-sr-clip vm-sr-min vm-sr-max nil] 3)) vm-write-string vm-leading-message-separator insert-buffer-substring vm-trailing-message-separator vm-messages-not-on-disk vm-set-buffer-modified-p t vm-clear-modification-flag-undos vm-check-for-killed-summary vm-assimilate-new-messages vm-update-summary-and-mode-line] 5]] 2) (fset 'mail #[(&optional noerase to subject in-reply-to cc replybuffer actions) " Uƪ \"!\n! Td\n\n! ? Uƪ \"!\n! Td\n!\n! !! &!!*" [1 nil buffer index noerase get-buffer "*mail*" format "*mail*<%d>" buffer-modified-p switch-to-buffer generate-new-buffer erase-buffer expand-file-name "~/" default-directory auto-save-mode auto-save-default mail-mode mail-setup to subject in-reply-to cc replybuffer actions buffer-auto-save-file-name file-exists-p message "Auto save file for draft message exists; consider M-x mail-recover" t] 7 "\ Edit a message to be sent. Prefix arg means resume editing (don't erase). When this function returns, the buffer `*mail*' is selected. The value is t if the message was newly initialized; otherwise, nil. \\ While editing message, type \\[mail-send-and-exit] to send the message and exit. Various special commands starting with C-c are available in sendmail mode to move to message header fields: \\{mail-mode-map} The variable `mail-signature' controls whether the signature file `mail-signature-file' is inserted immediately. If `mail-insert-signature' is non-nil, the signature file, denoted by the variable `mail-signature-file', is automatically inserted at the end of the message before sending. (Otherwise use C-c C-w). If `mail-self-blind' is non-nil, a BCC to yourself is inserted when the message is initialized. If `mail-default-reply-to' is non-nil, it should be an address (a string); a Reply-to: field with that address is inserted. If `mail-archive-file-name' is non-nil, an FCC field with that file name is inserted. If `mail-setup-hook' is bound, its value is called with no arguments after the message is initialized. It can add more default fields. When calling from a program, the second through fifth arguments TO, SUBJECT, IN-REPLY-TO and CC specify if non-nil the initial contents of those header fields. These arguments should not have final newlines. The sixth argument REPLYBUFFER is a buffer whose contents should be yanked if the user types C-c C-y. The seventh argument ACTIONS is a list of actions to take if/when the message is sent. Each action looks like (FUNCTION . ARGS); when the message is sent, we apply FUNCTION to ARGS. This is how Rmail arranges to mark messages `answered'." "P"]) (fset 'mail-recover #[nil "! )ŋ \")!)" [expand-file-name "~/" default-directory make-auto-save-file-name file-name ((byte-code "= !  & \"!" [system-type vax-vms "*Directory*" buffer-disable-undo standard-output call-process "ls" nil "-l" file-name yes-or-no-p format "Recover auto save file %s? "] 8)) nil buffer-read-only erase-buffer insert-file-contents error "mail-recover cancelled."] 3 "\ Reread contents of current buffer from its last auto-save file." nil]) (fset 'mail-other-window #[(&optional noerase to subject in-reply-to cc replybuffer sendactions) "!)  \n &" [t pop-up-windows pop-to-buffer "*mail*" mail noerase to subject in-reply-to cc replybuffer sendactions] 8 "\ Like `mail' command, but display mail buffer in another window." "P"]) (fset 'mail-other-screen #[(&optional noerase to subject in-reply-to cc replybuffer sendactions) "!!  \n&" [switch-to-buffer-other-screen get-buffer-create "*mail*" mail noerase to subject in-reply-to cc replybuffer sendactions] 8 "\ Like `mail' command, but display mail buffer in another screen." "P"]) (provide 'sendmail)