home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1992-01-31 | 70.3 KB | 1,129 lines
(defvar mh-e-RCS-id) (setq mh-e-RCS-id "$Header: mh-e.el,v 3.5 92/01/21 11:21:59 gildea Exp $") (setq mh-e-time-stamp "92/01/21 10:59:18 gildea") (provide (quote mh-e)) (defvar mh-redist-full-contents nil "\ Non-nil if the `dist' command needs whole letter for redistribution. This is the case when `send' is compiled with the BERK option.") (defvar mh-folder-mode-hook nil "\ Invoked in `mh-folder mode' on a new folder.") (defvar mh-letter-mode-hook nil "\ Invoked in `mh-letter-mode' on a new letter.") (defvar mh-compose-letter-function nil "\ Invoked in `mh-compose-and-send-mail' on a draft letter. It is passed three arguments: TO recipients, SUBJECT, and CC recipients.") (defvar mh-before-send-letter-hook nil "\ Invoked at the beginning of the \\[mh-send-letter] command.") (defvar mh-inc-folder-hook nil "\ Invoked after incorporating mail into a folder with \\[mh-inc-folder].") (defvar mh-before-quit-hook nil "\ Invoked by \\[mh-quit] before quitting mh-e. See also mh-quit-hook") (defvar mh-quit-hook nil "\ Invoked after quitting mh-e by \\[mh-quit]. See also mh-before-quit-hook") (defvar mh-ins-string nil "\ Temporarily set by `mh-insert-prefix' prior to running `mh-yank-hooks'.") (defvar mh-yank-hooks (quote (lambda nil (save-excursion (goto-char (point)) (or (bolp) (forward-line 1)) (while (< (point) (mark)) (insert mh-ins-string) (forward-line 1))))) "\ Hook to run citation function. Expects POINT and MARK to be set to the region to cite.") (defvar mh-clean-message-header nil "\ *Non-nil means clean headers of messages that are displayed or inserted. The variables `mh-visible-headers' and `mh-invisible-headers' control what is removed.") (defvar mh-visible-headers nil "\ *If non-nil, contains a regexp specifying the headers to keep when cleaning. Only used if `mh-clean-message-header' is non-nil. Setting this variable overrides `mh-invisible-headers'.") (defvar mhl-formfile nil "\ *Name of format file to be used by mhl to show messages. A value of T means use the default format file. Nil means don't use mhl to format messages.") (defvar mh-lpr-command-format "lpr -p -J '%s'" "\ *Format for Unix command that prints a message. The string should be a Unix command line, with the string '%s' where the job's name (folder and message number) should appear. The message text is piped to this command.") (defvar mh-print-background nil "\ *Print messages in the background if non-nil. WARNING: do not delete the messages until printing is finished; otherwise, your output may be truncated.") (defvar mh-summary-height 4 "\ *Number of lines in summary window (including the mode line).") (defvar mh-recenter-summary-p nil "\ *Recenter summary window when the show window is toggled off if non-nil.") (defvar mh-ins-buf-prefix "> " "\ *String to put before each non-blank line of a yanked or inserted message. Used when the message is inserted in an outgoing letter.") (defvar mh-do-not-confirm nil "\ *Non-nil means do not prompt for confirmation before some commands. Only affects certain innocuous commands.") (defvar mh-bury-show-buffer t "\ *Non-nil means that the displayed show buffer for a folder is buried.") (defvar mh-delete-yanked-msg-window nil "\ *Controls window display when a message is yanked by \\[mh-yank-cur-msg]. If non-nil, yanking the current message into a draft letter deletes any windows displaying the message.") (defvar mh-yank-from-start-of-msg t "\ *Controls which part of a message is yanked by \\[mh-yank-cur-msg]. If non-nil, include the entire message. If the symbol `body', then yank the message minus the header. If nil, yank only the portion of the message following the point. If the show buffer has a region, this variable is ignored.") (defvar mh-reply-default-reply-to nil "\ *Sets the person or persons to whom a reply will be sent. If nil, prompt for recipient. If non-nil, then \\[mh-reply] will use this value and it should be one of \"from\", \"to\", or \"cc\".") (defvar mh-recursive-folders nil "\ *If non-nil, then commands which operate on folders do so recursively.") (defvar mh-unshar-default-directory "" "\ *Default for directory name prompted for by mh-unshar-msg.") (defvar mh-cmd-note 4 "\ Offset to insert notation.") (defvar mh-note-repl "-" "\ String whose first character is used to notate replied to messages.") (defvar mh-note-forw "F" "\ String whose first character is used to notate forwarded messages.") (defvar mh-note-dist "R" "\ String whose first character is used to notate redistributed messages.") (defvar mh-good-msg-regexp "^....[^D^]" "\ Regexp specifiying the scan lines that are 'good' messages.") (defvar mh-deleted-msg-regexp "^....D" "\ Regexp matching scan lines of deleted messages.") (defvar mh-refiled-msg-regexp "^....\\^" "\ Regexp matching scan lines of refiled messages.") (defvar mh-valid-scan-line "^ *[0-9]" "\ Regexp matching scan lines for messages (not error messages).") (defvar mh-msg-number-regexp "^ *\\([0-9]+\\)" "\ Regexp to find the number of a message in a scan line. The message's number must be surrounded with \\( \\)") (defvar mh-msg-search-regexp "^[^0-9]*%d[^0-9]" "\ Format string containing a regexp matching the scan listing for a message. The desired message's number will be an argument to format.") (defvar mh-flagged-scan-msg-regexp "^....\\D\\|^....\\^\\|^....\\+\\|^.....%" "\ Regexp matching flagged scan lines. Matches lines marked as deleted, refiled, in a sequence, or the cur message.") (defvar mh-cur-scan-msg-regexp "^....\\+" "\ Regexp matching scan line for the cur message.") (defvar mh-show-buffer-mode-line-buffer-id "{%%b} %s/%d" "\ Format string to produce `mode-line-buffer-id' for show buffers. First argument is folder name. Second is message number.") (defvar mh-partial-folder-mode-line-annotation "select" "\ Annotation when displaying part of a folder. The string is displayed after the folder's name. NIL for no annotation.") (defvar mh-invisible-headers "^Received: \\|^Message-Id: \\|^Remailed-\\|^Via: \\|^Mail-from: \\|^Return-Path: \\|^In-Reply-To: \\|^Resent-" "\ Regexp matching lines in a message header that are not to be shown. If `mh-visible-headers' is non-nil, it is used instead to specify what to keep.") (defvar mh-rejected-letter-start (concat "^ ----- Unsent message follows -----$" "\\|^------- Unsent Draft$" "\\|^ --- The unsent message follows ---$") "\ Regexp specifying the beginning of the wrapper around a returned letter. This wrapper is generated by the mail system when rejecting a letter.") (defvar mh-to-field-choices (quote ((116 . "To:") (115 . "Subject:") (99 . "Cc:") (98 . "Bcc:") (102 . "Fcc:"))) "\ A-list of (character . field name) strings for mh-to-field.") (defvar mh-user-path "" "\ User's mail folder.") (defvar mh-last-destination nil "\ Destination of last refile or write command.") (defvar mh-folder-mode-map (make-keymap) "\ Keymap for MH folders.") (defvar mh-letter-mode-map (copy-keymap text-mode-map) "\ Keymap for composing mail.") (defvar mh-pick-mode-map (make-sparse-keymap) "\ Keymap for searching folder.") (defvar mh-letter-mode-syntax-table nil "\ Syntax table used while in mh-e letter mode.") (if mh-letter-mode-syntax-table nil (setq mh-letter-mode-syntax-table (make-syntax-table text-mode-syntax-table)) (set-syntax-table mh-letter-mode-syntax-table) (modify-syntax-entry 37 "." mh-letter-mode-syntax-table)) (defvar mh-folder-list nil "\ List of folder names for completion.") (defvar mh-draft-folder nil "\ Name of folder containing draft messages. NIL means do not use draft folder.") (defvar mh-unseen-seq nil "\ Name of the unseen sequence.") (defvar mh-previous-window-config nil "\ Window configuration before mh-e command.") (defvar mh-previous-seq nil "\ Name of the sequence to which a message was last added.") (defmacro mh-push (v l) (byte-code "ÂÃ EE" [l v setq cons] 5)) (defmacro mh-when (pred &rest body) (byte-code "Â BD" [pred body cond] 3)) (defmacro with-mh-folder-updating (save-modification-flag-p &rest body) (byte-code "@ÂÃÄÅÆ \" Ç ÈEE" [save-modification-flag-p body let ((folder-updating-mod-flag (buffer-modified-p))) prog1 append (let ((buffer-read-only nil) (buffer-file-name nil))) (mh-set-folder-modified-p folder-updating-mod-flag) (mh-set-folder-modified-p nil)] 6)) (defun mh-mapc (func list) (byte-code "
 @\"A " [list func funcall] 4)) (defun mh-rmail (&optional arg) "\ Inc(orporate) new mail (no arg) or scan a MH mail box (arg given). This front end uses the MH mail system, which uses different conventions from the usual mail system." (interactive "P") (byte-code "Á ÃÄ! Å " [arg nil mh-find-path call-interactively mh-visit-folder mh-inc-folder] 4)) (defun mh-smail nil "\ Compose and send mail with the MH mail system." (interactive) (byte-code "ÀÁ ÂÃ!" [nil mh-find-path call-interactively mh-send] 3)) (defun mh-smail-other-window nil "\ Compose and send mail in other window with the MH mail system." (interactive) (byte-code "ÀÁ ÂÃ!" [nil mh-find-path call-interactively mh-send-other-window] 3)) (defun mh-burst-digest nil "\ Burst apart the current message, which should be a digest. The message is replaced by its table of contents and the letters from the digest are inserted into the folder after that message." (interactive) (byte-code "ÄÅÁ!Æ !ÇÁ!ÈÉ!ÊË Ì$Í ÎÏ\"\"ÈÐ!)" [digest t mh-current-folder mh-first-msg-num nil mh-get-msg-num mh-process-or-undo-commands mh-set-folder-modified-p message "Bursting digest..." mh-exec-cmd "burst" "-inplace" mh-scan-folder format "%d-last" "Bursting digest...done"] 10)) (defun mh-copy-msg (prefix-provided msg-or-seq dest) "\ Copy specified MESSAGE(s) to another FOLDER without deleting them. Default is the displayed message. If optional prefix argument is provided, then prompt for the message sequence." (interactive (byte-code " ÂÃÁ\" ÄÁ!ÅÆÇÁ#E" [current-prefix-arg t mh-read-seq-default "Copy" mh-get-msg-num mh-prompt-for-folder "Copy to" ""] 8)) (byte-code "ÇÈÉ ÊË& Ì Í# Î Í#" [current-prefix-arg t msg-or-seq mh-current-folder dest prefix-provided mh-cmd-note nil mh-exec-cmd "refile" "-link" "-src" mh-notate-seq 67 mh-notate] 7)) (defun mh-delete-msg (msg-or-seq) "\ Mark the specified MESSAGE(s) for subsequent deletion and move to the next. Default is the displayed message. If optional prefix argument is given then prompt for the message sequence." (interactive (byte-code " ÂÃÁ\" ÄÁ!C" [current-prefix-arg t mh-read-seq-default "Delete" mh-get-msg-num] 3)) (byte-code "ÃÄ ! Å ! ÆÅ \"Ç " [current-prefix-arg t msg-or-seq nil numberp mh-delete-a-msg mh-map-to-seq-msgs mh-next-msg] 5)) (defun mh-delete-msg-no-motion (msg-or-seq) "\ Mark the specified MESSAGE(s) for subsequent deletion. Default is the displayed message. If optional prefix argument is provided, then prompt for the message sequence." (interactive (byte-code " ÂÃÁ\" ÄÁ!C" [current-prefix-arg t mh-read-seq-default "Delete" mh-get-msg-num] 3)) (byte-code "ÃÄ ! Å ! ÆÅ \"" [current-prefix-arg t msg-or-seq nil numberp mh-delete-a-msg mh-map-to-seq-msgs] 5)) (defun mh-delete-msg-from-seq (prefix-provided msg-or-seq &optional from-seq) "\ Delete MESSAGE (default: displayed message) from SEQUENCE. If optional prefix argument provided, then delete all messages from a sequence." (interactive (byte-code " ÃÄÂ\" ÅÂ!?
ÃÆÂ\"E)" [argp current-prefix-arg t mh-read-seq-default "Delete" mh-get-msg-num "Delete from"] 7)) (byte-code "Æ Ç! È\"" [argp current-prefix-arg t prefix-provided msg-or-seq from-seq nil mh-remove-seq mh-remove-msg-from-seq] 4)) (defun mh-edit-again (msg) "\ Clean-up a draft or a message previously sent and make it resendable." (interactive (byte-code "ÁÀ!C" [t mh-get-msg-num] 2)) (byte-code "Ç È
É \") ÊËÌ!!À\"ÍÎÏ\"!Ð 1 ÑÒÌ!Ç#ÓeÔÇ#ebÕÇ!Ö× ÇÇÇÇÇÇ& +" [t from-folder mh-current-folder config draft mh-draft-folder msg nil current-window-configuration equal pop-to-buffer find-file-noselect mh-msg-filename rename-buffer format "draft-%d" buffer-name mh-read-draft "clean-up" mh-clean-msg-header "^Date:\\|^Received:\\|^Message-Id:\\|^From:\\|^Delivery-Date:" set-buffer-modified-p mh-compose-and-send-mail ""] 23)) (defun mh-execute-commands nil "\ Process outstanding delete and refile requests." (interactive) (byte-code "Ã
Ä Å !Æ Ç È Â" [mh-narrowed-to-seq mh-current-folder t nil mh-widen mh-process-commands mh-set-scan-mode mh-goto-cur-msg mh-make-folder-mode-line] 6)) (defun mh-extract-rejected-mail (msg) "\ Extract a letter returned by the mail system and make it resendable. Default is the displayed message." (interactive (byte-code "ÁÀ!C" [t mh-get-msg-num] 2)) (byte-code "Æ È ÉÊË!Æ#ebÌÆÀ#, ÍÎ!Ïe`\"ÐeÑÆ#/ ÒÓ!ebÔÆ!ÕÖ ×Ø!×Ù!×Ú!ÆÆ& +" [t from-folder mh-current-folder config draft msg nil mh-rejected-letter-start current-window-configuration mh-read-draft "extraction" mh-msg-filename re-search-forward forward-char 1 delete-region mh-clean-msg-header "^Date:\\|^Received:\\|^Message-Id:\\|^From:\\|^Sender:\\|^Return-Path:" message "Does not appear to be a rejected letter." set-buffer-modified-p mh-compose-and-send-mail "" mh-get-field "To" "From" "cc"] 23)) (defun mh-first-msg nil "\ Move to the first message." (interactive) (byte-code "Àeb" [nil] 1)) (defun mh-forward (prefix-provided msg-or-seq to cc) "\ Forward MESSAGE(s) (default: displayed message). If optional prefix argument provided, then prompt for the message sequence." (interactive (byte-code " ÂÃÁ\" ÄÁ!ÅÆ!ÅÇ!F" [current-prefix-arg t mh-read-seq-default "Forward" mh-get-msg-num read-string "To: " "Cc: "] 8)) (byte-code "ËÑ ÒÓ\"Ô!? ÕÖ!7 ×ØÙ$ÚÛÁ#ÜÝ Þ $ßË!<