4.3BSD/usr/contrib/emacs/lisp/mh-e.elc


(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-hook nil "*Invoked in mh-compose-and-send-mail on an outgoing letter.  It is passed
three arguments: TO recipients, SUBJECT, and CC recipients.")

(defvar mh-auto-fill-letters t "*Non-nil means invoke auto-fill-mode in draft messages.")

(defvar mh-clean-message-header nil "*Non-nil means remove invisible header lines in messages.")

(defvar mh-use-mhl nil "*Non-nil means use mhl to format messages.")

(defvar mh-lpr-command-format "lpr -p -J '%s'" "*Format for Unix command line to print a message. The format should be
a unix command line, with the string \"%s\" where the folder and message
number should appear.")

(defvar mh-summary-height 4 "*Number of lines in summary window.")

(defvar mh-ins-buf-prefix ">> " "*String to put before each non-blank line of the the current message
as it is inserted in an outgoing letter.")

(defvar mh-cmd-note 4 "Offset to insert notation")

(defvar mh-invisible-headers "^Received: \\|^Message-Id: \\|^Remailed-\\|^Via: \\|^Mail-from: \\|eturn-Path: \\|^In-Reply-To: \\|^Resent-" "Regexp specifying headers that are not to be shown.")

(defvar mh-rejected-letter-start "^   ----- Unsent message follows -----$" "Regexp specifying the beginning of the wrapper around a letter returned
by the mail system.")

(defvar mh-good-msg-regexp "^....[^D^]" "Regexp specifiying the scan lines that are 'good' messages")

(defvar mh-user-path "" "User's mail folder.")

(defvar mh-last-destination nil "Destination of last " move " command.")

(defvar mh-folder-mode-map (make-sparse-keymap) "Keymap for MH folders.")

(defvar mh-letter-mode-map (make-sparse-keymap) "Keymap for composing mail.")

(defvar mh-pick-mode-map (make-sparse-keymap) "Keymap for searching folder.")

(defvar mh-folder-list nil "List of folder names for completion.")

(defmacro push (v l) (byte-code "	EE" [l v setq cons] 5))

(defmacro caar (l) (byte-code "DD" [l car] 3))

(defmacro cadr (l) (byte-code "DD" [l car cdr] 3))

(defmacro cdar (l) (byte-code "DD" [l cdr car] 3))

(defmacro cddr (l) (byte-code "DD" [l cdr] 3))

(defmacro when (pred &rest body) (byte-code "	BD" [pred body cond] 3))

(defun mapc (func list) (byte-code "	@\"A" [list func funcall] 4))

(defun mh-rmail (&optional arg) "\
Inc(orporate) new mail if optional ARG omitted, or scan a MH mail box
if arg is present.  This front end uses the MH mail system, which uses
different conventions from the usual mail system." (interactive "P") (byte-code "ň ? ň	7#!
\".Ђ/\" *== " [mh-folder-list arg folder t range nil mh-find-path mh-make-folder-list mh-prompt-for-folder "mh" "+inbox" read-string "Range [all]? " mh-scan-folder equal "" "all" delete-other-windows mh-inc-folder] 9))

(defun mh-smail nil "\
Send mail using the MH mail system." (interactive) (byte-code " !" [nil mh-find-path call-interactively mh-send] 3))

(defun mh-answer (&optional arg) "\
Answer a letter.  If given a non-nil ARGUMENT, then include the current
message in the reply." (interactive "P") (byte-code "Ɉ 
!
	
$!\"+\"K
	&
EDF\"\"\"p
	&
jDk\"\"\"
	&
D\"\"   !!? \"!\"!	!!!!
ebd	#
?	#Ɉ	
#!
&+)-" [msg-filename msg t minibuffer-help-form folder mh-current-folder show-buffer mh-show-buffer reply-to nil arg mh-user-path to subject cc mh-msg-filename mh-get-msg-num "from => Sender
  to => Sender and primary recipients
  cc => Sender and all recipients" completing-read "Reply to whom: " (("from") ("to") ("cc")) message "Composing a reply..." equal "from" "" apply mh-exec-cmd nconc list "repl" "-build" "-nocc" "all" "-filter" "mhl.reply" "to" "-cc" "cc" mh-read-draft delete-other-windows zerop buffer-size y-or-n-p "The file 'draft' exists.  Use for reply? " erase-buffer insert-file-contents format "%sreply" delete-file set-buffer-modified-p mh-get-field "To:" "Subject:" "Cc:" re-search-forward "^$" mh-display-msg mh-add-msg-to-seq "answered" "Composing a reply...done" mh-compose-and-send-mail "-" "Replied:"] 43))

(defun my-apply-command-to-seq (command) "\
Applies the next command to all messages in a sequence to be prompted for." (interactive "k") (byte-code "ˆ!	\"\"" [command mh-narrowed-to-seq nil funcall key-binding mh-read-seq "Apply to"] 6))

(defun mh-copy-msg (&optional seq) "\
Copy specified message(s) to another folder without deleting them.
Optional argument is a SEQUENCE name to copy." (interactive "P") (byte-code "ň	
	

!
#&	(#,\")" [msgs seq t mh-current-folder mh-cmd-note nil mh-get-msg-num mh-exec-cmd "refile" "-link" "-src" mh-prompt-for-folder "Copy to" "" mh-notate-seq 67 mh-notate] 11))

(defun mh-delete-msg (&optional seq) "\
Marks the specified message(s) for later deletion.  Optional argument is a
SEQUENCE name to  delete." (interactive "P") (byte-code "
\"  " [seq nil mh-map-to-seq-msgs mh-delete-a-msg mh-next-msg] 4))

(defun mh-delete-msg-from-seq (&optional arg) "\
Deletes a message from a sequence or, if optional ARG is non-nil, deletes
the sequence." (interactive "P") (byte-code "ˆ!!	!!\" " [arg t nil mh-remove-seq mh-read-seq "Delete" mh-remove-msg-from-seq mh-get-msg-num "Delete from" mh-next-msg] 7))

(defun mh-execute-commands nil "\
Process outstanding delete and move commands." (interactive) (byte-code "ƈ ƈ	!) ʉ " [mh-narrowed-to-seq mh-current-folder mh-summarize t mode-name mode-line-format nil mh-widen mh-process-commands delete-other-windows "Mh-Summary" mh-make-mode-line] 6))

(defun mh-extract-rejected-mail nil "\
Extract a letter returned by the mail system and make it resendable." (interactive "") (byte-code "ƈ	
!#  !!?! !eb!!e`\"e!)eb
!
!!!%)" [msg-filename mh-folder-filename t mh-rejected-letter-start mh-invisible-headers mh-current-folder nil format "%s%d" mh-get-msg-num mh-read-draft zerop buffer-size y-or-n-p "The file 'draft' exists.  Use it? " erase-buffer insert-file-contents re-search-forward forward-char 1 kill-region "^Date:\\|^Received:\\|^Message-Id:\\|^From:" mh-clean-msg-header switch-to-buffer mh-compose-and-send-mail "" mh-get-field "To" "From" "cc"] 22))

(defun mh-forward (&optional seq) "\
Forward a letter.  Optional argument is a SEQUENCE of messages to forward." (interactive "P") (byte-code "Ɉ!! 
!\"!?+!G$ 	$	!M
M eb!!`d\"!)

\"!)
SO
Ɉ 
#\") !
#
#
	&+-" [to cc msg-filename msg seq t folder mh-current-folder mh-user-path nil subject trim forw-subject read-string "To: " "Cc: " mh-msg-filename mh-get-msg-num file-exists-p format "%sdraft" y-or-n-p "The file 'draft' exists.  Discard it? " mh-exec-cmd "forw" "-build" mh-read-draft mh-insert-fields "To:" "Cc:" set-buffer-modified-p re-search-forward "^------- Forwarded Message" previous-line 1 narrow-to-region mh-get-field "From:" string-match "<" "Subject:" 0 widen "[%s: %s]" delete-other-windows mh-add-msg-list-to-seq mh-seq-to-msgs "forwarded" mh-add-msg-to-seq mh-compose-and-send-mail "" "F" "Forwarded:"] 33))

(defun mh-goto-msg (number &optional no-error-if-no-message) "\
Position the cursor at message NUMBER.  Do not signal an error if optional
ARG is t.  Return non-nil if cursor is at message." (interactive "nMessage number? ") (byte-code "ˆ`eb	!
#?'b?!	\"\"ˆ
22  )" [starting-place number nil t no-error-if-no-message re-search-forward mh-msg-search-pat error "No message %d " beginning-of-line mh-maybe-show] 6))

(defun mh-inc-folder nil "\
inc(orporate) new mail into inbox." (interactive) (byte-code "!!??! $ %" [mh-current-folder nil pop-to-buffer "+inbox" boundp mh-make-folder mh-get-new-mail mh-show] 6))

(defun mh-kill-folder nil "\
Removes the current folder." (interactive) (byte-code "ˆ\"!&!	#	!!	!))!" [mh-current-folder folder nil yes-or-no-p format "Remove folder %s? " switch-to-buffer-other-window " *mh-temp*" mh-exec-cmd "rmf" "-nointeractive" mh-remove-folder-from-folder-list message "Folder removed" kill-buffer "Folder not removed"] 9))

(defun mh-list-folders nil "\
List mail folders." (interactive) (byte-code "!! !eb!" [nil message "listing folders..." switch-to-buffer-other-window " *mh-temp*" erase-buffer mh-exec-cmd-output "folders" "listing folders...done"] 6))

(defun mh-msg-is-in-seq nil "\
Displays the sequences that the current messages is in." (interactive) (byte-code "ň	!
.
@A>$
@@!#%ň
A
#+" [msg t l mh-seq-list seqs nil mh-get-msg-num "" format "%s %s" symbol-name message "Message %d is in sequences: %s"] 7))

(defun mh-move-msg (&optional seq) "\
Move specified message(s) to another folder.  Optional argument is a
SEQUENCE of messages to refile." (interactive "P") (byte-code "È	#!B

A#A! " [mh-last-destination t seq nil move intern mh-prompt-for-folder "Destination" "" mh-map-to-seq-msgs mh-move-a-msg mh-next-msg] 6))

(defun mh-move-or-write-again nil "\
Move or write the current message to same folder or file as the last move
or write." (interactive) (byte-code "ˆ?
!ˆ@=#A!A\"1	1A!A\"! " [mh-last-destination t nil error "No previous move" move mh-move-a-msg message "Destination folder: %s" mh-write-msg-to-file "Destination: %s" sit-for 3 mh-next-msg] 8))

(defun mh-narrow-to-seq nil "\
Restrict the display of the current folder to the messages in the sequence
to be prompted for.  Use \\[mh-widen] to undo this command." (interactive "") (byte-code "È!d!+	\"	d\"!! 66!\"+" [seq eob buffer-read-only nil mode-line-format mh-narrowed-to-seq t mh-read-seq "Narrow to" mh-seq-to-msgs mh-copy-seq-to-point narrow-to-region mh-make-mode-line symbol-name recenter error "No messages in sequence `%s'"] 11))

(defun mh-next-line (&optional arg) "\
Move to next undeleted message in window and display body if summary
flag set." (interactive "p") (byte-code "È!lj
$#  22!!!" [arg mh-next-direction mh-good-msg-regexp nil t forward-line 1 forward re-search-forward 0 beginning-of-line mh-maybe-show -1 sit-for 2 message "No more messages"] 8))

(defun mh-renumber-folder nil "\
Renumber messages in folder to be 1..N." (interactive) (byte-code "! ! !" [nil message "packing buffer..." mh-pack-folder mh-unmark-all-headers mh-goto-cur-msg "packing buffer...done"] 6))

(defun mh-page-digest nil "\
Advance displayed message to next digested message." (interactive) (byte-code "!	!		#?!!)!!)" [mh-show-buffer nil case-fold-search t switch-to-buffer-other-window move-to-window-line search-forward "
From:" other-window -1 error "No more messages" recenter 0] 8))

(defun mh-page-msg (&optional arg) (interactive "P") (byte-code "!" [arg nil scroll-other-window] 2))

(defun mh-previous-line (&optional arg) "\
Move to previous message in window and display body if summary flag set." (interactive "p") (byte-code "ˆĉ	
$?! " [mh-next-direction mh-good-msg-regexp nil arg backward re-search-backward 0 message "Beginning of messages" mh-maybe-show] 5))

(defun mh-previous-page nil "\
Page the displayed message backwards." (interactive) (byte-code "!Î	!))" [mh-show-buffer nil switch-to-buffer-other-window ((byte-code "!" [other-window -1] 2)) scroll-down] 3))

(defun mh-print-msg (&optional seq) "\
Print specified message(s) on a line printer.  Optional argument is a
SEQUENCE of messages to print." (interactive "P") (byte-code "Ĉ		!!
!C!	G#\"	:قB	
!#\"%e\"	[قc	
!#\"$&	u
#z
\"
#!)" [msgs seq t shell-file-name nil msg mh-lib mh-folder-filename mh-lpr-command-format mh-current-folder mh-cmd-note reverse mh-seq-to-msgs mh-get-msg-num message "printing message..." call-process 0 "-c" format "(scan -clear %s ; %smhl -nobell -clear %s) | %s" mapconcat (lambda (msg) (byte-code "" [msg] 1)) " " mh-msg-filenames "Mail" "%s/%d" "%smhl -nobell -clear %s | %s" mh-notate-seq 80 mh-notate mh-add-msg-list-to-seq printed "printing message...done"] 28))

(defun mh-put-msg-in-seq (&optional arg) "\
Add a message to a sequence or, if optional ARG is non-nil, add the
messages from a sequence to another sequence." (interactive "P") (byte-code "ˆ!!!\"	!!\" " [arg t nil mh-add-msg-list-to-seq mh-seq-to-msgs mh-read-seq "Add messages from" "to" mh-add-msg-to-seq mh-get-msg-num "Add to" mh-next-msg] 9))

(defun mh-rescan-folder (&optional arg) "\
Rescan a folder after optionally processing the outstanding commands.  If
the optional argument is non-nil, then prompt for the range of messages to
display, otherwise assume the whole buffer." (interactive "P") (byte-code "ň	
!
!ňɉ
(!)\"" [mh-delete-list mh-move-list mh-current-folder mh-next-direction arg nil y-or-n-p "Process commands? " mh-process-commands forward mh-scan-folder read-string "Range [all]? " "all"] 6))

(defun mh-redistribute (to cc) "\
Redistribute a letter." (interactive "sRedist-To: 
sRedist-Cc: ") (byte-code "Ȉ 
!͋+" [msg-filename msg t folder mh-current-folder to cc mh-invisible-headers nil mh-progs mh-user-path mh-msg-filename mh-get-msg-num ((byte-code "  !!? !!	#
\"?2
#3Ĉe!) !
$&	
#&!" [msg-filename to cc mh-invisible-headers nil mh-progs mh-user-path msg folder mh-read-draft zerop buffer-size y-or-n-p "The file 'draft' exists.  Redistribute old version? " erase-buffer insert-file-contents re-search-forward "^$\\|^---" insert "Resent-To: " "
" equal "" "Resent-cc: " "^Message-Id:\\|^Received:\\|Return-Path:" mh-clean-msg-header save-buffer message "Redistributing..." call-process "/bin/sh" 0 "-c" format "mhdist=1 mhaltmsg=%s %s/send -push %s/draft" mh-annotate-msg "R" "-component" "Resent:" "-text" "\"%s %s\"" "Redistributing...done"] 26))] 5))

(defun mh-write-msg-to-file (file) "\
Append the current message to the end of a file." (interactive "FSave message in file: ") (byte-code "È	B
 	#&" [mh-last-destination file shell-file-name nil write call-process 0 "-c" format "cat %s >> %s " mh-msg-filename] 11))

(defun mh-search-folder nil "\
Search the current folder for messages matching a pattern." (interactive) (byte-code "È	! !!? !)" [folder mh-current-folder mh-searching-folder nil switch-to-buffer-other-window "pick-pattern" zerop buffer-size y-or-n-p "Reuse pattern? " mh-make-pick-template message ""] 8))

(defun mh-send (to cc subject) "\
Compose and send a letter." (interactive "sTo: 
sCc: 
sSubject: ") (byte-code "Lj!	
!   !#!?g 
\"!;
\"!P\"!M\"!P!
&!db!
%)" [folder mh-current-folder mh-user-path mh-lib to subject cc nil boundp message "Composing a message..." mh-read-draft delete-other-windows zerop buffer-size y-or-n-p "The file 'draft' exists.  Use it? " erase-buffer file-exists-p format "%scomponents" insert-file-contents error "Can't find components" mh-insert-fields "To:" "Subject:" "Cc:" set-buffer-modified-p "Composing a message...done" mh-compose-and-send-mail ""] 26))

(defun mh-show nil "\
Show message indicated by cursor in scan buffer." (interactive) (byte-code "	ʉ! #
! !
! Z!!	B	*" [mh-summarize nil mode-name msg-num t folder mh-current-folder mh-show-buffer mh-summary-height mh-seen-list "Mh-Show" mh-get-msg-num mh-display-msg mh-msg-filename switch-to-buffer-other-window delete-other-windows shrink-window window-height recenter 1] 12))

(defun mh-sort-folder nil "\
Sort the messages in the current folder by date." (interactive "") (byte-code "ˆ!ĉ!\"!\"" [mh-current-folder mh-next-direction nil mh-process-commands forward message "sorting folder..." mh-exec-cmd "sortm" "sorting folder...done" mh-scan-folder "all"] 7))

(defun mh-toggle-summarize nil "\
Turn the summary mode of displaying messages on or off." (interactive) (byte-code "È? ʼn \"!&
&ʉ " [mh-summarize mode-name t nil delete-other-windows "Mh-Summarize" recenter / window-height 2 "Mh-Show" mh-show] 6))

(defun mh-undo (&optional seq) "\
Undo the deletion or move of the specified message(s).  Optional argument
is a name of a sequence of messages to apply undo to." (interactive "P") (byte-code "Lj!7!\"#44!
	\"
\"\")l!fP!\"#cc!\"\")ll" [seq mh-delete-list msg mh-cmd-note t dest mh-move-list nil looking-at "^....D" mapc (lambda (msg) (byte-code "	\"	\"" [mh-delete-list msg delq mh-remove-msg-from-seq deleted] 4)) mh-seq-to-msgs mh-notate-seq 32 mh-get-msg-num delq mh-remove-msg-from-seq deleted mh-notate "^....\\^" (lambda (msg) (byte-code "
\"" [msg dest mh-move-list mapc (lambda (dest) (byte-code "	\"" [msg dest mh-remove-msg-from-seq] 3))] 3)) (lambda (dest) (byte-code "	\"" [msg dest mh-remove-msg-from-seq] 3))] 17))

(defun mh-undo-folder nil "\
Undo all commands in current folder." (interactive "") (byte-code "!			ȉ
!
!" [mh-delete-list nil mh-move-list mh-seq-list mh-next-direction t yes-or-no-p "Undo all commands in folder? " forward mh-unmark-all-headers message "Commands not undone."] 4))

(defun mh-visit-folder (&optional arg) "\
Visit a new folder.  If optional argument is non-nil, then prompt for the
range of messages, otherwise scan the whole buffer." (interactive "p") (byte-code "Ĉ	#!
\"!ʂ\"
\" *" [folder t range arg nil mh-prompt-for-folder "Visit" "" read-string "Range [all]? " "all" mh-scan-folder equal delete-other-windows] 7))

(defun mh-widen nil "\
Remove restrictions from the current folder, thereby showing all messages." (interactive "") (byte-code "	ed\"  )	" [buffer-read-only nil mode-line-format mh-narrowed-to-seq delete-region widen mh-make-mode-line] 5))

(defun mh-delete-a-msg nil "\
Delete the message pointed to by the cursor." (byte-code "	!!\"Ɉ
B	#\")" [msg t mh-delete-list mh-cmd-note mh-get-msg-num looking-at "....\\^" error "Message %d already moved.  Undo move before deleting." nil mh-add-msg-to-seq deleted mh-notate 68] 7))

(defun mh-move-a-msg (destination) "\
Move the message pointed to by the cursor." (byte-code "!!\"/
!>?\"B#	
#
\")" [nil msg t destination mh-move-list mh-cmd-note looking-at "....D" error "Message %d is already deleted.  Undo delete before moving." mh-get-msg-num mh-add-msg-to-seq mh-notate 94] 8))

(defun mh-display-msg (msg-num msg-filename show-buffer) "\
Displays the message NUMBER and PATHNAME in BUFFER." (byte-code "!?	\"Ȉ
!p!\"?t  7$:!eb
Ke!ebcc# !)!
	%	" [msg-filename msg-num show-buffer buffer-file-name mh-use-mhl mh-clean-message-header t case-fold-search nil mode-line-format folder file-exists-p error "Message %d does not exist." switch-to-buffer buffer-flush-undo equal erase-buffer unlock-buffer mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" insert-file-contents mh-clean-msg-header re-search-forward "^To:\\|^From:\\|^Subject:\\|^Date:" beginning-of-line recenter 0 set-buffer-modified-p concat "{%b}	%[%p of " "/" "%]	%M"] 20))

(defun mh-clean-msg-header (start) "\
Flush extraneous lines in a message header.  The variable
mh-invisible-headers contains a regular expression specifying these lines." (byte-code "b	
#`\"eb	
#5 !!1 !! )" [start nil t mh-invisible-headers search-forward "

" narrow-to-region re-search-forward beginning-of-line kill-line 1 looking-at "^[ 	]+" unlock-buffer] 11))

(defun mh-read-draft nil "\
Read draft file into draft buffer.  Avoids errors even if disk file has been
modified underneath the buffer.  Causes an error if the folder is modified and
the user does not want to change it." (byte-code "! !!!!	\"!!" [nil mh-user-path switch-to-buffer "draft" buffer-modified-p y-or-n-p "Draft is modified; kill anyways? " set-buffer-modified-p error "Draft is not killed." kill-buffer switch-to-buffer-other-window find-file-noselect format "%sdraft"] 11))

(defun mh-next-msg nil "\
Move backward or forward to the next message in the buffer." (byte-code "=!!" [mh-next-direction forward mh-next-line 1 mh-previous-line] 3))

(defun mh-maybe-show nil "\
If the scan listing is not summarized, show the message pointed to
by the cursor." (byte-code "?
 ‡" [mh-summarize mh-show nil] 2))

(defun mh-make-folder (name) "\
Create and initialize a new mail folder called NAME and make it the
current folder." (byte-code "!p! 
 \"O#




& ݉" [name buffer-read-only nil mh-user-path t mode-name switch-to-buffer buffer-flush-undo kill-all-local-variables erase-buffer make-local-vars mh-current-folder mh-show-buffer format "show-%s" mh-folder-filename "%s%s/" 1 mh-summarize mh-next-seq-num 0 mh-delete-list mh-move-list mh-seq-list mh-seen-list mh-next-direction forward mh-narrowed-to-seq mh-folder-mode "Mh-Summarize"] 29))

(defun make-local-vars (&rest pairs) "\
Takes VARIABLE-VALUE pairs and makes local variables initialized to the
value." (byte-code "@!@A@LAA" [pairs make-local-variable] 4))

(defun mh-folder-mode nil "\
Major mode for \"editing\" an MH folder scan listing.
Messages can be marked for refiling and deletion.  However, both actions
are defered until you request execution with \\[mh-execute-commands].
\\{mh-folder-mode-map}
  A prefix argument (\\[universal-argument]) to delete, move, list, or undo applies the action to a message sequence.

Variables controlling mh-e operation are (defaults in parentheses):

 mh-auto-fill-letters (t)
    Non-nil means invoke auto-fill-mode in draft messages.

 mh-clean-message-header (nil)
    Non-nil means remove header lines matching the regular expression
    specified in mh-invisible-headers from messages.

 mh-use-mhl (nil)
    Non-nil means use mhl to format displayed messages.

 mh-lpr-command-format (\"lpr -p -J '%s'\")
    Format for command used to print a message on a system printer.

 mh-summary-height (4)
    Number of lines in the summary window.

 mh-ins-buf-prefix (\">> \")
    String to insert before each non-blank line of a message as it is
    inserted in a letter being composed." (byte-code "!ʼnƉ!!ɇ" [mh-folder-mode-map major-mode mode-name mh-folder-mode-hook use-local-map mh-folder-mode "mh-folder" boundp funcall nil] 4))

(defun mh-scan-folder (folder range) "\
Scan the folder FOLDER over the range RANGE.  Return in the folder." (byte-code "!?
!3	3
.!)!+ /Lj!
!ed\"UX
\"O\"T
#! ! " [folder t mh-delete-list mh-move-list mh-seq-list range mode-line-format nil get-buffer mh-make-folder y-or-n-p "Process commands?" mh-process-commands mh-undo-folder switch-to-buffer-other-window mh-regenerate-headers count-lines 0 equal "all" message "Folder %s is empty" "No messages in %s, range %s" sit-for 5 mh-make-mode-line mh-unmark-all-headers mh-goto-cur-msg] 16))

(defun mh-regenerate-headers (range) "\
Replace buffer with scan of its contents over range RANGE." (byte-code "	 \"!   
%eb!(!9!299! \"!)" [buffer-read-only nil range t message format "scanning %s..." buffer-name delete-other-windows erase-buffer mh-exec-cmd-output "scan" "-noclear" "-noheader" looking-at "scan: no messages in" keep-lines "^[ ]*[0-9]" "scan: " "scanning %s...done"] 16))

(defun mh-get-new-mail nil "\
Read new mail into the current buffer.  Return t if there was new mail,
nil otherwise.  Leave cursor in current buffer." (byte-code "	` \"!	!̉!db`!b \"!!F! 
b!	o!\\ 
b!	oo!  )*" [buffer-read-only nil point-before-inc mh-next-direction start-of-inc mode-line-format t message format "inc %s..." buffer-name mh-unmark-all-headers forward flush-lines "^inc:\\|^scan:" mh-exec-cmd-output "inc" "inc %s...done" looking-at "inc: no mail" keep-lines "^[ ]*[0-9]" mh-make-mode-line "No new mail." "inc:" "inc error" mh-goto-cur-msg] 20))

(defun mh-make-mode-line (&optional annotation) "\
Returns a string for mode-line-format.  The optional ANNOTATION string is
displayed after the folder's name." (byte-code "ebed\"
!


#
!db!
!6\"7VG	#HS\"T%)+))" [lines first nil case-fold-search current t last annotation count-lines mh-get-msg-num re-search-forward "....\\+" previous-line 1 format "{%%b%s}  [%d messages%s%s]  (%%p%%%% - %%m)  %%M" "/%s" "" 0 "  (%d - %d)" "  cur = %d"] 16))

(defun mh-unmark-all-headers (remove-all-flags) "\
This function removes all + flags from the headers, and if called
  with a non-nil argument, removes all D and ^ flags too." (byte-code "		eb	#	#%!c*" [buffer-read-only nil case-fold-search remove-all-flags t re-search-forward "^....\\D\\|^....\\^\\|^....\\+\\|.....%" "^....\\+" delete-backward-char 1 " "] 5))

(defun mh-goto-cur-msg nil "\
Position the cursor at the current message." (byte-code "	!!
\"?\"db! !.
.\"!)" [curmsg mh-current-folder t mh-get-cur-msg zerop mh-goto-msg forward-line -1 mh-maybe-show message "No current message" mh-notate 43 4 recenter 0] 9))

(defun mh-pack-folder nil "\
Closes and packs the current folder." (byte-code "	!
!!
$!!) " [buffer-read-only nil mh-current-folder mode-line-format message "closing folder..." mh-process-commands "packing folder..." mh-exec-cmd-quiet 0 "folder" "-pack" mh-regenerate-headers "all" "packing done" mh-make-mode-line] 9))

(defun mh-process-commands (buffer) "\
Process outstanding commands for the buffer BUFFER." (byte-code "!!
!6!
?!Ӊ\"ˆE
E#\")7ˆ	\"
U\"D
\"\"
!
!l
!&} V}&!
)


	

)!" [buffer buffer-read-only nil mh-seq-list mh-seen-list unseen-seq mh-current-folder msgs dest mh-move-list mh-delete-list mh-show-buffer buffer-file-name message "Processing deletes and moves..." switch-to-buffer mh-process-seq-commands mh-get-profile-field "Unseen-Sequence:" "unseen" apply mh-exec-cmd-quiet nconc 0 "mark" "-sequence" "-delete" mapc (lambda (dest) (byte-code "	!!B
	!E\"\")" [msgs dest buffer mh-seq-to-msgs mh-delete-scan-msgs apply mh-exec-cmd nconc "refile" "-src" symbol-name] 10)) mh-exec-cmd "rmm" format "%s" mh-delete-scan-msgs mh-get-msg-num "-seq" "cur" "-add" "-zero" buffer-size "all" "Processing deletes and moves...done"] 22))

(defun mh-delete-scan-msgs (msgs) "\
Delete the scan listing lines for each of the msgs in the LIST." (byte-code "eb@!!A)" [msgs flush-lines mh-msg-search-pat] 5))

(defun mh-letter-mode nil "\
Mode for composing letters in mh-e.
\\{mh-letter-mode-map}" (byte-code " 
!ʈ!	P!
P!Ήω!7A!Bʇ" [mh-auto-fill-letters paragraph-start paragraph-separate mh-letter-mode-map major-mode mode-name mh-letter-mode-hook text-mode auto-fill-mode 1 nil make-local-variable "^[ 	]*[-_][-_][-_]+$\\|" use-local-map mh-letter-mode "mh-letter" boundp funcall] 8))

(defun mh-to-to nil "\
Move point to end of To: field." (interactive) (byte-code " \"" [t nil expand-abbrev mh-position-on-field "To:"] 4))

(defun mh-to-subject nil "\
Move point to end of Subject: field.  Creates the field if necessary" (interactive) (byte-code " \"?	\"!" [t nil expand-abbrev mh-position-on-field "Subject:" "To:" insert-string "
Subject: "] 5))

(defun mh-to-cc nil "\
Move point to end of Cc: field.  Creates the field if necessary" (interactive) (byte-code " \"?	\"!" [t nil expand-abbrev mh-position-on-field "Cc:" "To:" insert-string "
Cc: "] 5))

(defun mh-to-bcc nil "\
Move point to end of Bcc: field.  Creates the field if necessary" (interactive) (byte-code " \"?	\"!" [t nil expand-abbrev mh-position-on-field "Bcc:" "To:" insert-string "
Bcc: "] 5))

(defun mh-to-fcc nil "\
Move point to end of Fcc: field.  Creates the field if necessary" (interactive) (byte-code " \"?	\"!" [t nil expand-abbrev mh-position-on-field "Fcc:" "To:" insert-string "
Fcc: "] 5))

(defun mh-check-whom nil "\
List recipients of the current message." (interactive) (byte-code "ˆ 	! !!p! \"!!)" [file-name t nil buffer-file-name set-buffer-modified-p save-buffer message "Checking recipients..." switch-to-buffer-other-window "*Mail Recipients*" bury-buffer erase-buffer mh-exec-cmd-output "whom" other-window -1 "Checking recipients...done"] 11))

(defun mh-make-pick-template nil "\
Initialize a buffer with a template for a pick pattern." (byte-code "  !& !ωeb " [mh-pick-mode-map mode-line-format erase-buffer kill-all-local-variables make-local-variable mh-searching-folder insert "From: 
" "To: 
" "Cc: 
" "Date: 
" "Subject: 
" "---------
" mh-letter-mode use-local-map "{%b}	Pick Pattern	(^C^C to do search)" end-of-line] 10))

(defun mh-do-pick-search nil "\
Search the current folder for the messages matching the qualification
in the current buffer and make them into a sequence called `search'." (interactive) (byte-code "ň 

!eb!5	B	%\"#Ӊ!	!\\#," [pattern-buffer searching-buffer mh-searching-folder range pattern nil msgs mh-cmd-note buffer-name "all" message "Searching..." mh-next-pick-field mh-seq-from-command search nconc "pick" list "-sequence" "search" "-list" "Searching...done" switch-to-buffer mh-notate-seq 37 1] 15))

(defun mh-next-pick-field (buffer) "\
Return the next piece of a pick argument that can be extracted from the
BUFFER.  Returns nil if no pieces remain." (byte-code "!
ml
#8!!\"!\"!!\"!
D*l
#g!`d\"GVX\"?bDc)l
l)" [buffer case-fold-search t nil component pat body switch-to-buffer re-search-forward "^\\([a-z].*\\):[ 	]*\\([a-z0-9].*\\)$" format "-%s" downcase buffer-substring match-beginning 1 match-end 2 forward-line "^-*$" forward-char 0 equal "
" "-search"] 17))

(defun mh-compose-and-send-mail (send-args sent-from-folder to subject cc &optional annotate-char annotate-field search-prefix) "\
Edit and compose a draft message and send or save it.
SENT-FROM-FOLDER is buffer containing summary of current folder, if any.
SEND-ARGS is an optional argument passed to the send command.
The TO, SUBJECT, and CC fields are passed to the mh-compose-letter-hook.
If ANNOTATE-CHAR is non-null, it is used to notate the scan listing of the
current message.  In that case, the ANNOTATE-FIELD is used to build a string
for mh-annotate-msg." (byte-code "	̋! 

\"#&؉!3C	
$D)" [sent-from-msg nil sent-from-folder send-args annotate-field annotate-char search-prefix mode-line-format mh-compose-letter-hook to subject cc ((byte-code "
!
!" [sent-from-folder sent-from-msg nil switch-to-buffer mh-get-msg-num] 4)) pop-to-buffer "draft" mh-letter-mode make-local-vars mh-send-args mh-sent-from-folder mh-sent-from-msg mh-annotate-field mh-annotate-char mh-annotate-search-prefix "" "{%b}  %[Mail/draft%] (%p - %m) (^C^C to send) %M" boundp funcall] 15))

(defun mh-send-letter (&optional arg) "\
Send the letter in the current buffer.  If given an ARGUMENT, the delivery
process is monitored and displayed." (interactive "P") (byte-code "Ɉ !6  ! (
%.
$	!*OG &O %u
#!#!#&vɈ! !" [arg from-buffer file-name mh-send-args mh-annotate-char mh-sent-from-msg mh-sent-from-folder mh-annotate-field mh-annotate-search-prefix nil save-buffer message "Sending..." buffer-name buffer-file-name pop-to-buffer " *mh-temp*" erase-buffer mh-exec-cmd-output "send" "-watch" "-unique" mh-exec-cmd-quiet 0 "-push" mh-annotate-msg "-component" "-text" format "\"%s %s\"" mh-get-field "%s%s" "To:" "Cc:" "Sending...done" kill-buffer] 30))

(defun mh-insert-letter (&optional arg) "\
Insert a message in the current letter, asking for folder and number.
Removes headers using mh-invisible-headers.
Prefixes each non-blank line with mh-ins-buf-prefix (default \">> \").
Just \\[universal-argument] means do not indent and do not delete any
header fields.  Leaves point before the text and mark after it." (interactive "p") (byte-code "ˆ	
#\"\"!`\",\"-ˆO$$\"?W
!
a\"!  +" [folder mh-sent-from-folder nil message mh-sent-from-msg start mh-user-path arg mh-ins-buf-prefix mh-prompt-for-folder "Message from" read-input format "Message number%s: " " [%d]" "" equal "%d" mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" "%s%s/%s" 1 4 mh-clean-msg-header narrow-to-region mh-insert-prefix-string widen exchange-point-and-mark] 16))

(defun mh-insert-cur-msg nil "\
Inserts the currently displayed message into the current draft buffer.
Prefixes each non-blank line with the string mh-ins-buf-prefix.
If there is a region set in the  message's buffer,only the region will
be inserted.  Otherwise, the region from (point) to the end will be grabbed." (interactive) (byte-code "ƈ`p
qqa`a\"`d\"	q\"!
! )*" [to-point to-buffer mh-sent-from-folder mh-show-buffer mh-ins-str mh-ins-buf-prefix nil buffer-substring narrow-to-region insert-string mh-insert-prefix-string widen] 7))

(defun mh-insert-prefix-string (ins-string) "\
Preface each line in the current buffer with STRING." (byte-code "ebP	#eb" [ins-string nil replace-regexp "^." "\\&"] 4))

(defun mh-fully-kill-draft nil "\
Kill the draft message file and the draft message buffer.  Use kill-buffer
if you don't want to delete the draft message file." (interactive "") (byte-code " ! ! !" [nil file-exists-p buffer-file-name delete-file kill-buffer buffer-name] 7))

(defmacro mh-seq-name (pair) (byte-code "D" [pair car] 2))

(defmacro mh-seq-msgs (pair) (byte-code "D" [pair cdr] 2))

(defun mh-seq-to-msgs (seq) "\
Returns the messages in sequence SEQ." (byte-code "	\"A" [seq mh-seq-list assoc] 3))

(defun mh-msg-to-seq (msg) "\
Given a MESSAGE number, return the first sequence in which it occurs." (byte-code "	
@A>?A@@)" [l mh-seq-list msg] 3))

(defun mh-read-seq (prompt &optional seq) "\
Read and return a sequence name from the minibuffer, prompting with 
the string PROMPT and supplying the optional DEFAULT.
% defaults to the sequences that the current message is in.
Makes sure that the sequence is known to MH commands." (byte-code "	

!\"$!\"\"(!!:\"3
::!

!\"
))" [input prompt seq mh-seq-list t completing-read format "%s %s %s" "sequence:" "[%s] " symbol-name "" mh-seq-names equal "%" mh-msg-to-seq mh-get-msg-num intern mh-process-seq mh-seq-to-msgs] 14))

(defun mh-seq-names (seq-list) "\
Returns an alist of the names of the SEQUENCES." (byte-code "
\"" [entry nil seq-list mapcar (lambda (entry) (byte-code "@!B" [entry nil symbol-name] 3))] 3))

(defun mh-seq-from-command (folder seq command) "\
In FOLDER, make a sequence named SEQ by executing COMMAND." (byte-code "	ɋ!BB)*" [msgs nil case-fold-search t command num folder mh-seq-list seq ((byte-code "B\"eb	
#2!!\"!!?,B-)
" [command nil t num msgs apply mh-exec-cmd-quiet " *mh-temp*" re-search-forward "\\([0-9]+\\)" string-to-int buffer-substring match-beginning 1 match-end zerop] 10)) switch-to-buffer] 3))

(defun mh-remove-seq (seq) "\
Delete the sequence SEQ." (byte-code "	
\"@
\"@A\\#)" [entry seq mh-seq-list mh-cmd-note assoc delq mh-notate-seq 32 1] 7))

(defun mh-remove-msg-from-seq (msg-num seq &optional do-not-mark) "\
Remove a message MSG-NUM from the sequence SEQ.  If optional FLAG is
non-nil, do not mark the message as being part of a sequence." (byte-code "	\"
A\"\")?%\\\"&ȇ" [seq mh-seq-list msg-num do-not-mark mh-cmd-note assoc setcdr delq nil mh-notate 32 1] 7))

(defun mh-add-msg-to-seq (msg-num seq &optional do-not-mark) "\
Add the message MSG-NUM to the SEQUENCE.  If optional FLAG is non-nil,
do not mark the message as being part of a sequence." (byte-code "	
\"?\\\"ʈ?%	
CB
B,
AB\")" [seq-list seq mh-seq-list do-not-mark mh-cmd-note msg-num assoc mh-notate 37 1 nil setcdr] 6))

(defun mh-add-msg-list-to-seq (msgs seq &optional do-not-mark) "\
Add the messages in LIST to the SEQUENCE.  If optional FLAG is non-nil,
do not mark the messages as being part of a sequence." (byte-code "\"" [msg seq do-not-mark msgs mapc (lambda (msg) (byte-code "	
#" [msg seq do-not-mark mh-add-msg-to-seq] 4))] 3))

(defun mh-rename-seq (seq new-name) "\
Rename a SEQUENCE to have a new NAME." (interactive "SOld sequence name: 
SNew name: ") (byte-code "Ĉ	
\"\"	!\")" [old-seq seq mh-seq-list new-name nil assoc rplaca error "Sequence %s does not exists" symbol-name] 6))

(defun mh-notate-seq (seq notation offset) "\
Mark all messages in the sequence SEQ with the NOTATION at character
OFFSET." (byte-code "	
$" [seq notation offset mh-map-to-seq-msgs mh-notate] 5))

(defun mh-map-to-seq-msgs (func seq &rest args) "\
Invoke the function FUNC at each message in the sequence SEQ, passing
the remaining ARGS as arguments." (byte-code "	!@!
\"A)" [msgs seq func args mh-seq-to-msgs mh-goto-msg apply] 6))

(defun mh-map-over-seqs (func seq-list) "\
Apply the function FUNC to each element in the sequence LIST,
passing the sequence name and a list of messages as arguments." (byte-code "	@@@A#A" [seq-list func funcall] 5))

(defun mh-process-seq-commands (seq-list) "\
Process outstanding sequence commands for the sequences in SEQ-LIST." (byte-code "\"" [seq-list mh-map-over-seqs mh-process-seq] 3))

(defun mh-process-seq (seq msgs) "\
Mark sequence SEQ to contain MSGS." (byte-code "!O\"? \"%	\"\"!ч" [seq msgs equal symbol-name 0 1 "+" apply mh-exec-cmd nconc list "mark" "-zero" "-seq" format "%s" "-add" nil] 12))

(defun mh-copy-seq-to-point (seq location) "\
Copy the messages in SEQUENCE to after the LOCATION in the current buffer." (byte-code "	#" [seq location mh-map-to-seq-msgs mh-copy-line-to-point] 4))

(defun mh-copy-line-to-point (location) "\
Copy the current line to the LOCATION in the current buffer." (byte-code " `!`\"	b b)" [beginning-of-line location forward-line 1 copy-region-as-kill yank] 5))

(defun mh-exec-cmd (command &rest args) "\
Execute MH command COMMAND with ARGS.  Any output is shown to the user." (byte-code "! 	#

F!\"\" V'!()" [mh-progs command nil t args switch-to-buffer-other-window " *mh-temp*" erase-buffer apply call-process nconc format "%s%s" mh-list-to-string buffer-size 0 sit-for 5] 10))

(defun mh-exec-cmd-quiet (buffer command &rest args) "\
In BUFFER, execute MH command COMMAND with ARGS.  Return in buffer, if
one exists." (byte-code ";! 	
#F!\"\"" [buffer mh-progs command nil args switch-to-buffer erase-buffer apply call-process nconc format "%s%s" mh-list-to-string] 10))

(defun mh-exec-cmd-output (command &rest args) "\
Execute MH command COMMAND with ARGS putting the output into buffer after
point.  Set mark after inserted text." (byte-code "`s	#

F!\"\" " [mh-progs command nil t args apply call-process nconc format "%s%s" mh-list-to-string exchange-point-and-mark] 8))

(defun mh-exec-lib-cmd-output (command &rest args) "\
Execute MH library command COMMAND with ARGS.  Put the output into
buffer after point.  Set mark after inserted text." (byte-code "`s	#

F!\"\" " [mh-lib command nil t args apply call-process nconc format "%s%s" mh-list-to-string exchange-point-and-mark] 8))

(defun mh-list-to-string (l) "\
Flattens the list L and makes every element a string." (byte-code "	
t
@9
@\"Bk
@!+
@\"Bk
@\"7k
@;F
@Bk
@?Pk
@<b
@!\"kk
@\"
A!)" [new-list nil l t format "%s" numberp "%d" equal "" nconc mh-list-to-string error "Bad argument %s" nreverse] 10))

(defun mh-annotate-msg (msg buffer note &rest args) "\
Mark the MESSAGE in BUFFER listing with the character NOTE and annotate
the saved message with ARGS." (byte-code "	
BBB\"!	\" 
\\\"!)" [buffer msg args t note mh-cmd-note apply mh-exec-cmd "anno" switch-to-buffer mh-goto-msg mh-notate 1 nil] 7))

(defun mh-notate (notation offset) "\
Marks the current message with the character NOTATION at position OFFSET." (byte-code "	 `
\\b!c )" [buffer-read-only nil offset notation beginning-of-line delete-char 1] 4))

(defun mh-prompt-for-folder (prompt default can-create) "\
Prompt for a folder name with PROMPT.  Returns the folder's name.
DEFAULT is used if the folder exists and the user types CR.
If the CAN-CREATE flag is t,then a non-existant folder is made." (byte-code "	\"͂	\"#
?%.
\".	\"6Ĉ
\"B
\"K	\\
O\"?\\
\"
O#!?v
\"!
\"
O#%
\"
CB
OCB!
\"?
CB
OCB)
*" [prompt default name mh-folder-list nil can-create new-file-p mh-user-path t format "%s folder%s" equal "" "? " " [%s]? " completing-read "+" 0 1 "+%s" file-exists-p "%s%s" y-or-n-p "Folder %s does not exist. Create it? " message "Creating %s" call-process "mkdir" "Creating %s...done" error assoc] 26))

(defun mh-make-folder-list nil "\
Returns a list of the user's folders in a form suitable for completing
read." (interactive) (byte-code "ŋ" [list nil start t folder ((byte-code "$eb	m?/`	#
`Z\"\"CB)))" [list nil start t folder mh-exec-cmd-quiet " *mh-temp*" "folders" "-fast" "-norecurse" search-forward "
" buffer-substring 1 format "+%s"] 7))] 1))

(defun mh-remove-folder-from-folder-list (folder) "\
Remove FOLDER from the list of folders." (byte-code "	O\"\"" [mh-folder-list folder nil delq assoc 1] 5))

(defun mh-get-msg-num (error-if-no-message) "\
Returns the message number of the current message.  If the argument
ERROR-IF-NO-MESSAGE is non-nil, then complain if the cursor is not 
pointing to a message." (byte-code " !!!\"!&!!&	&
)" [error-if-no-message t nil beginning-of-line looking-at "^[ ]*\\([0-9]+\\)" string-to-int buffer-substring match-beginning 1 match-end error "Cursor not pointing to message"] 8))

(defun mh-msg-search-pat (n) "\
Returns a search pattern for message N in the scan listing." (byte-code "W
\"/W\"/W'\"/	/\"" [n t 10 format "^[^0-9][^0-9][^0-9]%d" 100 "^[^0-9][^0-9]%d" 1000 "^[^0-9]%d" "^%d"] 6))

(defun mh-msg-filename nil "\
Returns a string containing the pathname for the file containing the
current message." (byte-code "	!#" [mh-folder-filename t format "%s%d" mh-get-msg-num] 5))

(defun mh-msg-filenames (msgs folder) "\
Returns a string of filenames for MSGS in FOLDER." (byte-code "
#" [folder msg msgs mapconcat (lambda (msg) (byte-code "	P" [folder msg] 2)) " "] 4))

(defun mh-find-path nil "\
Set mh-user-path to the user's Mail directory from  ~/.mh_profile." (byte-code "!\"ʼn\"O\"?/!#0·" [mh-user-path equal mh-get-profile-field "Path:" "" "Mail/" format "%s/" 0 1 "/" "%s/%s" getenv "HOME" nil] 9))

(defun mh-get-profile-field (field) "\
Return FIELD from the user's .mh_profile file." (byte-code "" [field ((byte-code "!?
!ň! !!" [field file-exists-p "~/.mh_profile" error "Cannot find .mh_profile file." nil switch-to-buffer " *mh_temp*" erase-buffer insert-file-contents mh-get-field] 7))] 1))

(defun mh-get-cur-msg (folder) "\
Returns the number of the 'cur' message in FOLDER." (byte-code "! #ed\"!)" [folder switch-to-buffer " *mh_temp*" erase-buffer mh-exec-cmd-output "pick" "cur" string-to-int buffer-substring] 7))

(defun mh-get-field (field) "\
Find and return the value of field FIELD in the current buffer.
Returns the empty string if the field is not in the message." (byte-code "	eb
	#?ƂO!ƂO	O	#!!\"` !A!4!
`\"#*)" [case-fold-search t field nil end-of-match search-forward "" looking-at "[	 ]*$" re-search-forward "[	 ]*\\([a-zA-z0-9/.].*\\)$" buffer-substring match-beginning 1 match-end forward-line "[ 	]" backward-char format "%s%s"] 16))

(defun mh-insert-fields (&rest name-values) "\
Insert the NAME-VALUE pairs in the current buffer." (byte-code "	
B
@
A@eb\"
	#?,! $7	7 \"
AA*)" [case-fold-search t name-values field-name value nil re-search-forward format "^%s" "^---\\|^$" beginning-of-line insert " " "
" end-of-line] 10))

(defun mh-position-on-field (field set-mark) "\
Set point to the end of the line beginning with FIELD.  Sets the mark
to the point, if SET-MARK is non-nil." (byte-code "	`s
ˆeb	\"
#  !
" [set-mark field nil t re-search-forward format "^%s" end-of-line] 5))

(define-key mh-folder-mode-map "?" (quote mh-msg-is-in-seq))

(define-key mh-folder-mode-map "%" (quote mh-put-msg-in-seq))

(define-key mh-folder-mode-map "%" (quote mh-delete-msg-from-seq))

(define-key mh-folder-mode-map "n" (quote mh-narrow-to-seq))

(define-key mh-folder-mode-map "w" (quote mh-widen))

(define-key mh-folder-mode-map "" (quote my-apply-command-to-seq))

(define-key mh-folder-mode-map "u" (quote mh-undo-folder))

(define-key mh-folder-mode-map " " (quote mh-page-digest))

(define-key mh-folder-mode-map "e" (quote mh-extract-rejected-mail))

(define-key mh-folder-mode-map "f" (quote mh-visit-folder))

(define-key mh-folder-mode-map "k" (quote mh-kill-folder))

(define-key mh-folder-mode-map "l" (quote mh-list-folders))

(define-key mh-folder-mode-map "p" (quote mh-renumber-folder))

(define-key mh-folder-mode-map "s" (quote mh-search-folder))

(define-key mh-folder-mode-map "r" (quote mh-rescan-folder))

(define-key mh-folder-mode-map "l" (quote mh-print-msg))

(define-key mh-folder-mode-map "t" (quote mh-toggle-summarize))

(define-key mh-folder-mode-map "c" (quote mh-copy-msg))

(define-key mh-folder-mode-map ">" (quote mh-write-msg-to-file))

(define-key mh-folder-mode-map "i" (quote mh-inc-folder))

(define-key mh-folder-mode-map "x" (quote mh-execute-commands))

(define-key mh-folder-mode-map "e" (quote mh-execute-commands))

(define-key mh-folder-mode-map "r" (quote mh-redistribute))

(define-key mh-folder-mode-map "f" (quote mh-forward))

(define-key mh-folder-mode-map "s" (quote mh-send))

(define-key mh-folder-mode-map "a" (quote mh-answer))

(define-key mh-folder-mode-map "g" (quote mh-goto-msg))

(define-key mh-folder-mode-map "" (quote mh-previous-page))

(define-key mh-folder-mode-map " " (quote mh-page-msg))

(define-key mh-folder-mode-map "." (quote mh-show))

(define-key mh-folder-mode-map "u" (quote mh-undo))

(define-key mh-folder-mode-map "!" (quote mh-move-or-write-again))

(define-key mh-folder-mode-map "^" (quote mh-move-msg))

(define-key mh-folder-mode-map "d" (quote mh-delete-msg))

(define-key mh-folder-mode-map "p" (quote mh-previous-line))

(define-key mh-folder-mode-map "n" (quote mh-next-line))

(define-key mh-letter-mode-map "b" (quote mh-to-bcc))

(define-key mh-letter-mode-map "w" (quote mh-check-whom))

(define-key mh-letter-mode-map "c" (quote mh-to-cc))

(define-key mh-letter-mode-map "f" (quote mh-to-fcc))

(define-key mh-letter-mode-map "s" (quote mh-to-subject))

(define-key mh-letter-mode-map "t" (quote mh-to-to))

(define-key mh-letter-mode-map "q" (quote mh-fully-kill-draft))

(define-key mh-letter-mode-map "y" (quote mh-insert-cur-msg))

(define-key mh-letter-mode-map "" (quote mh-insert-letter))

(define-key mh-letter-mode-map "" (quote mh-send-letter))

(define-key mh-pick-mode-map "" (quote mh-do-pick-search))

(define-key mh-pick-mode-map "b" (quote mh-to-bcc))

(define-key mh-pick-mode-map "c" (quote mh-to-cc))

(define-key mh-pick-mode-map "f" (quote mh-to-fcc))

(define-key mh-pick-mode-map "s" (quote mh-to-subject))

(define-key mh-pick-mode-map "t" (quote mh-to-to))

(define-key mh-pick-mode-map "w" (quote mh-check-whom))