mh-e.elc 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  1. (defvar mh-folder-mode-hook nil "\
  2. *Invoked in mh-folder-mode on a new folder.")
  3. (defvar mh-letter-mode-hook nil "\
  4. *Invoked in mh-letter-mode on a new letter.")
  5. (defvar mh-compose-letter-hook nil "\
  6. *Invoked in mh-compose-and-send-mail on an outgoing letter. It is passed
  7. three arguments: TO recipients, SUBJECT, and CC recipients.")
  8. (defvar mh-clean-message-header nil "\
  9. *Non-nil means remove invisible header lines or only show visible header
  10. lines in messages.")
  11. (defvar mh-visible-headers nil "\
  12. *If non-nil, it contains a regexp specifying the headers that are shown in
  13. a message.")
  14. (defvar mh-use-mhl nil "\
  15. *Non-nil means use mhl to format messages.")
  16. (defvar mh-lpr-command-format "lpr -p -J '%s'" "\
  17. *Format for Unix command line to print a message. The format should be
  18. a unix command line, with the string \"%s\" where the folder and message
  19. number should appear.")
  20. (defvar mh-summary-height 4 "\
  21. *Number of lines in summary window.")
  22. (defvar mh-ins-buf-prefix ">> " "\
  23. *String to put before each non-blank line of the the current message
  24. as it is inserted in an outgoing letter.")
  25. (defvar mh-cmd-note 4 "\
  26. Offset to insert notation")
  27. (defvar mh-invisible-headers "^Received: \\|^Message-Id: \\|^Remailed-\\|^Via: \\|^Mail-from: \\|^Return-Path: \\|^In-Reply-To: \\|^Resent-" "\
  28. Regexp specifying headers that are not to be shown.")
  29. (defvar mh-rejected-letter-start "^ ----- Unsent message follows -----$" "\
  30. Regexp specifying the beginning of the wrapper around a letter returned
  31. by the mail system.")
  32. (defvar mh-good-msg-regexp "^....[^D^]" "\
  33. Regexp specifiying the scan lines that are 'good' messages")
  34. (defvar mh-redist-full-contents t "\
  35. Non-nil if MH `dist' command wants the whole letter to redistribute (i.e.,
  36. MH.6). Nil otherwise.")
  37. (defvar mh-user-path "" "\
  38. User's mail folder.")
  39. (defvar mh-last-destination nil "\
  40. Destination of last " move " command.")
  41. (defvar mh-folder-mode-map (make-sparse-keymap) "\
  42. Keymap for MH folders.")
  43. (defvar mh-letter-mode-map (make-sparse-keymap) "\
  44. Keymap for composing mail.")
  45. (defvar mh-pick-mode-map (make-sparse-keymap) "\
  46. Keymap for searching folder.")
  47. (defvar mh-folder-list nil "\
  48. List of folder names for completion.")
  49. (defmacro push (v l) (byte-code "ÂÃ EE‡" [l v setq cons] 5))
  50. (defmacro caar (l) (byte-code "ÁÁDD‡" [l car] 3))
  51. (defmacro cadr (l) (byte-code "ÁÂDD‡" [l car cdr] 3))
  52. (defmacro cdar (l) (byte-code "ÁÂDD‡" [l cdr car] 3))
  53. (defmacro cddr (l) (byte-code "ÁÁDD‡" [l cdr] 3))
  54. (defmacro when (pred &rest body) (byte-code "Â BD‡" [pred body cond] 3))
  55. (defun mapc (func list) (byte-code "… @\"ˆA‰ˆ‚‡" [list func funcall] 4))
  56. (defun mh-rmail (&optional arg) "\
  57. Inc(orporate) new mail (no arg) or scan a MH mail box (arg given).
  58. This front end uses the MH mail system, which uses different conventions
  59. from the usual mail system." (interactive "P") (byte-code "ÁˆÂ ˆƒÃÄ!‚Å ‡" [arg nil mh-find-path call-interactively mh-visit-folder mh-inc-folder] 4))
  60. (defun mh-smail nil "\
  61. Send mail using the MH mail system." (interactive) (byte-code "ÀˆÁ ˆÂÃ!‡" [nil mh-find-path call-interactively mh-send] 3))
  62. (defun mh-smail-other-window nil "\
  63. Send mail in other window using the MH mail system." (interactive) (byte-code "ÀˆÁ ˆÂÃ!‡" [nil mh-find-path call-interactively mh-send-other-window] 3))
  64. (defun mh-answer (prefix-provided msg) "\
  65. Answer a MESSAGE (default: displayed message).
  66. If (optional) prefix argument provided, then include the message in the reply." (interactive (byte-code "ÂÁ!D‡" [current-prefix-arg t mh-get-msg-num] 3)) (byte-code "ĈÐÑÒÓÄÁ$Ô!
  67.  ÕÖ!ˆ× Ø\"†'× Ù\"ƒFÚÛÜÝÞßàáâ& …AãäD\"\"‚‰× å\"ƒiÚÛÜÝÞßàæå& …dãäD\"\"‚‰× ç\"…‰ÚÛÜÝÞßàæâ& …‡ãäD\"\"ˆèéêë \"\"ˆìêë \"!ˆí ˆîÄ!ˆïð!ïñ!ïò! ebˆóô!ˆ ?…Åõ  #ˆö÷Á#ˆÕø!ˆùÙ úû&+,)‡" [current-prefix-arg t minibuffer-help-form reply-to nil msg-filename msg folder mh-current-folder show-buffer mh-show-buffer prefix-provided mh-user-path to subject cc "from => Sender
  68. to => Sender and primary recipients
  69. cc => Sender and all recipients" completing-read "Reply to whom: " (("from") ("to") ("cc")) mh-msg-filename message "Composing a reply..." equal "from" "" apply mh-exec-cmd nconc list "repl" "-build" "-nodraftfolder" "-nocc" "all" "-filter" "mhl.reply" "to" "-cc" "cc" mh-read-draft "reply" format "%sreply" delete-file delete-other-windows set-buffer-modified-p mh-get-field "To:" "Subject:" "Cc:" mh-goto-header-end 1 mh-display-msg mh-add-msg-to-seq "answered" "Composing a reply...done" mh-compose-and-send-mail "-" "Replied:"] 38))
  70. (defun mh-burst-digest nil "\
  71. Burst apart the current message, which should be a digest. Message is
  72. replaced by its table of contents and the letters from the digest are inserted
  73. into the folder after that message." (interactive) (byte-code "ƈÇÁ!
  74. † …ÈÉ!ƒÊ !‚Ë ˆÌÍ!ˆÎÏ Ð$ˆÑ ÒÓ \"\"ˆÌÔ!)‡" [digest t mh-delete-list mh-move-list mh-current-folder mh-first-msg-num nil mh-get-msg-num yes-or-no-p "Process outstanding commands (or lose them)? " mh-process-commands mh-undo-folder message "Bursting digest..." mh-exec-cmd "burst" "-inplace" mh-scan-folder format "%d-last" "Bursting digest...done"] 11))
  75. (defun mh-copy-msg (prefix-provided msg-or-seq dest) "\
  76. Copy specified MESSAGE(s) (default: displayed message) to another
  77. FOLDER without deleting them.
  78. If (optional) prefix argument supplied, then prompt for sequence to use
  79. instead of message." (interactive (byte-code "ƒ ÃÄ \"‚ÅÂ!ÆÇÈÂ#E‡" [current-prefix-arg mh-narrowed-to-seq t mh-read-seq "Copy" mh-get-msg-num mh-prompt-for-folder "Copy to" ""] 8)) (byte-code "ȈÉÊ ËÌ &ˆƒÍ Î#‚ Ï Î#‡" [current-prefix-arg mh-narrowed-to-seq 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))
  80. (defun mh-delete-msg (prefix-provided msg-or-seq) "\
  81. Mark the specified MESSAGE(s) (default: displayed message) for later
  82. deletion.
  83. If (optional) prefix argument supplied, then prompt for sequence to use
  84. instead of message." (interactive (byte-code "ƒ ÃÄ \"‚ÅÂ!D‡" [current-prefix-arg mh-narrowed-to-seq t mh-read-seq "Delete" mh-get-msg-num] 4)) (byte-code "ň ƒ ÆÇ \"‚Ç !ˆÈ ‡" [current-prefix-arg mh-narrowed-to-seq t prefix-provided msg-or-seq nil mh-map-to-seq-msgs mh-delete-a-msg mh-next-msg] 4))
  85. (defun mh-delete-msg-from-seq (prefix-provided msg-or-seq &optional from-seq) "\
  86. Delete MESSAGE (default: displayed message) from SEQUENCE.
  87. If (optional) prefix argument supplied, then prompt for sequence to use
  88. instead of message." (interactive (byte-code " ƒÄÅ
  89. \"‚ÆÃ!?…ÄÇ
  90. \"E)‡" [argp current-prefix-arg mh-narrowed-to-seq t mh-read-seq "Delete" mh-get-msg-num "Delete from"] 7)) (byte-code "Lj ƒ È !‚É \"ˆÊ ‡" [argp current-prefix-arg mh-narrowed-to-seq t prefix-provided msg-or-seq from-seq nil mh-remove-seq mh-remove-msg-from-seq mh-next-msg] 4))
  91. (defun mh-execute-commands nil "\
  92. Process outstanding delete and move requests." (interactive) (byte-code "ň…Æ ˆŠÇ !)ˆÈ ˆÃ‰ˆÉ‰ˆÊ ‡" [mh-narrowed-to-seq mh-current-folder mh-summarize t mode-name nil mh-widen mh-process-commands delete-other-windows "Mh-Summary" mh-make-folder-mode-line] 5))
  93. (defun mh-extract-rejected-mail (msg) "\
  94. Extract a letter returned by the mail system (default: displayed message)
  95. and make it resendable." (interactive (byte-code "ÁÀ!C‡" [t mh-get-msg-num] 2)) (byte-code "ƈ
  96. ÇÈÉÊ #\"ˆebˆË !ˆÌÍ!ˆÎe`\"ˆÏeÐÆ#ˆebˆÑÆ!ˆÒÓ ÔÕ!ÔÖ!Ô×!&)‡" [t from-folder mh-current-folder mh-folder-filename msg mh-rejected-letter-start nil mh-read-draft "extraction" format "%s%d" re-search-forward forward-char 1 kill-region mh-clean-msg-header "^Date:\\|^Received:\\|^Message-Id:\\|^From:" set-buffer-modified-p mh-compose-and-send-mail "" mh-get-field "To" "From" "cc"] 17))
  97. (defun mh-forward (prefix-provided msg-or-seq to cc) "\
  98. Forward MESSAGE(s) (default: displayed message).
  99. If (optional) prefix argument supplied, then prompt for sequence to use
  100. instead of message." (interactive (byte-code "ƒ ÃÄ \"‚ÅÂ!ÆÇ!ÆÈ!F‡" [current-prefix-arg mh-narrowed-to-seq t mh-read-seq "Forward" mh-get-msg-num read-string "To: " "Cc: "] 8)) (byte-code "ÈˆÏ !ÐÑÒ\"!?†ÓÔ!ƒ7ÕÖר %ˆÙÚÈ\"ˆÛÜ Ý
  101. $ˆÞÈ!‚;ÙÚÈ\"ˆebˆßà!ˆáâ!ˆã`d\"ˆŠäå!) æç \" Šäè!)  …p é SO‰ ˆê ˆŠÛèÑë  #\")ˆì ˆƒ“íî !ïÂ#‚˜ð ïÂ#ˆñÚ   
  102. òó&+*‡" [current-prefix-arg mh-narrowed-to-seq t msg-filename msg-or-seq folder mh-current-folder mh-user-path nil to cc subject trim forw-subject prefix-provided mh-msg-filename file-exists-p format "%sdraft" y-or-n-p "The file 'draft' exists. Discard it? " mh-exec-cmd "forw" "-build" "-nodraftfolder" 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:"] 31))
  103. (defun mh-goto-msg (number &optional no-error-if-no-message) "\
  104. Position the cursor at message NUMBER.
  105. Non-nil second argument means do not signal an error if message does not exist.
  106. Return non-nil if cursor is at message." (interactive "nMessage number? ") (byte-code "ÁˆÇÁ!`È !… UƒÅ‚N…) W…)É ÁÅ#ƒ0Å‚N…? V…?Ê ÁÅ#ƒFÅ‚NebˆÉ ÁÅ#ƒ\\Ë ˆÌ !ˆÅ‚k
  107. bˆ?…iÍÎ \"ˆÁ+‡" [cur-msg nil starting-place msg-pattern number t no-error-if-no-message mh-get-msg-num mh-msg-search-pat re-search-forward re-search-backward beginning-of-line mh-maybe-show error "No message %d "] 10))
  108. (defun mh-inc-folder (&optional maildrop-name) "\
  109. Inc(orporate) new mail into inbox.
  110. Optional prefix argument specifies an alternate maildrop from the default.
  111. If this is given, mail is incorporated into the current folder, rather
  112. than +inbox." (interactive (byte-code "…
  113. ÂÃÄ \"!C‡" [current-prefix-arg mh-user-path expand-file-name read-file-name "inc mail from file: "] 4)) (byte-code "Ĉ
  114. ?…ÅÆ!ˆÇÃ!?† ?…ÈÆ!ˆÉ
  115. !‡" [current-prefix-arg mh-user-path maildrop-name mh-current-folder nil switch-to-buffer "+inbox" boundp mh-make-folder mh-get-new-mail] 5))
  116. (defun mh-kill-folder nil "\
  117. Remove the current folder." (interactive) (byte-code "ˆÃÄÅ\"!ƒ!ÆÇ \"ˆÈ !ˆÉÊ!ˆË !)‚$ÉÌ!‡" [mh-current-folder folder nil yes-or-no-p format "Remove folder %s? " mh-exec-cmd-demon "rmf" mh-remove-folder-from-folder-list message "Folder removed" kill-buffer "Folder not removed"] 8))
  118. (defun mh-list-folders nil "\
  119. List mail folders." (interactive) (byte-code "ÁˆÂ�ŠÃÂ!ˆÄed\"ˆÅÆ!ˆÇÈÀ\"ˆebˆÅÉ!)‘‡" [t nil " *mh-temp*" switch-to-buffer delete-region message "listing folders..." mh-exec-cmd-output "folders" "listing folders...done"] 7))
  120. (defun mh-msg-is-in-seq (msg) "\
  121. Display the sequences that contain MESSAGE (default: displayed message)." (interactive (byte-code "ÁÀ!C‡" [t mh-get-msg-num] 2)) (byte-code "ň
  122. Æ …& @A>…ÇÈÉ @@! #‰ˆ A‰ˆ‚ˆÊË #*‡" [t l mh-seq-list seqs msg nil "" format "%s %s" symbol-name message "Message %d is in sequences: %s"] 6))
  123. (defun mh-move-msg (prefix-provided msg-or-seq dest) "\
  124. Move MESSAGE(s) (default: displayed message) to another FOLDER.
  125. If (optional) prefix argument provided, then prompt for sequence to use
  126. instead of message." (interactive (byte-code "ƒ ÃÄ \"‚ÅÂ!ÆÇÈÉÂ#!E‡" [current-prefix-arg mh-narrowed-to-seq t mh-read-seq "Move" mh-get-msg-num intern mh-prompt-for-folder "Destination" ""] 9)) (byte-code "ÇˆÈ B‰ˆ ƒÉÊ #‚Ê \"ˆË ‡" [current-prefix-arg mh-narrowed-to-seq t mh-last-destination dest prefix-provided msg-or-seq nil move mh-map-to-seq-msgs mh-move-a-msg mh-next-msg] 4))
  127. (defun mh-move-or-write-again (msg) "\
  128. Re-execution the last move or write command on the given MESSAGE (default:
  129. displayed message).
  130. Use the same folder or file as the previous move or write command." (interactive (byte-code "ÁÀ!C‡" [t mh-get-msg-num] 2)) (byte-code "È ?…
  131. ÄÅ!ˆ @Æ=ƒ Ç
  132. A\"ˆÈÉ A\"‚+Ê
  133. A\"ˆÈË A\"ˆÌ ‡" [t mh-last-destination msg nil error "No previous move" move mh-move-a-msg message "Destination folder: %s" mh-write-msg-to-file "Destination: %s" mh-next-msg] 7))
  134. (defun mh-narrow-to-seq (seq) "\
  135. Restrict display of this folder to just messages in a sequence.
  136. Reads which sequence. Use \\[mh-widen] to undo this command." (interactive (byte-code "ÀÁ!C‡" [mh-read-seq "Narrow to"] 2)) (byte-code "ˆdÂÆ !ƒ%Ç \"ˆÈd\"ˆÉÊ !!ˆË ˆ ‰‚+ÌÍÊ !\"*‡" [eob buffer-read-only nil seq mh-narrowed-to-seq t mh-seq-to-msgs mh-copy-seq-to-point narrow-to-region mh-make-folder-mode-line symbol-name recenter error "No messages in sequence `%s'"] 10))
  137. (defun mh-next-line (&optional arg) "\
  138. Move to next undeleted message in window." (interactive "p") (byte-code "ÈŃ ‚ Æ!ˆÇ‰ˆÈ
  139. ÃÉ$ƒ&Ê ˆËÌÄ!!‚0ÅÍ!ˆÎ ˆÏÐ!‡" [arg mh-next-direction mh-good-msg-regexp nil t forward-line 1 forward re-search-forward 0 beginning-of-line mh-maybe-show mh-get-msg-num -1 delete-other-windows message "No more messages"] 9))
  140. (defun mh-renumber-folder nil "\
  141. 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))
  142. (defun mh-page-digest nil "\
  143. Advance displayed message to next digested message." (interactive) (byte-code "ˆŠÄ!ˆÅÆ!ˆÂÇÈÂÃ#…ÇÉÂÃ#?…%ÊË!ˆÌÍ!)ˆÎÈÂÃ#ˆÏÐ!ˆÑÆ!ˆÊË!)‡" [mh-show-buffer case-fold-search nil t switch-to-buffer-other-window move-to-window-line 0 search-forward "
  144. " "From:" other-window -1 error "No more messages." search-backward next-line 2 recenter] 11))
  145. (defun mh-page-digest-backwards nil "\
  146. Back up displayed message to previous digested message." (interactive) (byte-code "ˆŠÄ!ˆÅÆ!ˆÂÇ ˆÈÉÂÃ#…ÈÊÂÃ#?…(ËÌ!ˆÍÎ!)ˆÈÉÂÃ#ˆÏÐ!ˆÑÆ!ˆËÌ!)‡" [mh-show-buffer case-fold-search nil t switch-to-buffer-other-window move-to-window-line 0 beginning-of-line search-backward "
  147. " "From:" other-window -1 error "No more messages." next-line 2 recenter] 12))
  148. (defun mh-page-msg (&optional arg) (interactive "P") (byte-code "ÁˆÂ!‡" [arg nil scroll-other-window] 2))
  149. (defun mh-previous-line (&optional arg) "\
  150. Move to previous undeleted message in window." (interactive "p") (byte-code "ˆʼnˆÆ ÂÇ $ƒÈÉÄ!!‚Ê ˆËÌ!‡" [mh-next-direction mh-good-msg-regexp nil arg t backward re-search-backward 0 mh-maybe-show mh-get-msg-num delete-other-windows message "Beginning of messages"] 6))
  151. (defun mh-previous-page nil "\
  152. 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))
  153. (defun mh-print-msg (prefix-provided msg-or-seq) "\
  154. Print MESSAGE(s) (default: displayed message) on a line printer.
  155. If (optional) prefix argument is supplied, then prompt for sequence to use
  156. instead of message." (interactive (byte-code "ƒÃÄÅÆ \"!!‚ÇÂ!CD‡" [current-prefix-arg mh-narrowed-to-seq t reverse mh-seq-to-msgs mh-read-seq "Print" mh-get-msg-num] 6)) (byte-code "ĈÌÍ!ˆÎ ÄÄÄÏ ƒ8ÐÑÒÓÔ#Õ\"Ð ƒ+Ö‚3Ð×
  157. @#\"%‚WÐØÕ\"Ð ƒMÖ‚UÐ×
  158. @#\"$&ˆ ƒhÙÚ #‚pÛ@Ú #ˆÜÝÂ#ˆÌÞ!‡" [current-prefix-arg mh-narrowed-to-seq t shell-file-name nil prefix-provided msg-or-seq mh-lib mh-folder-filename mh-lpr-command-format mh-current-folder mh-cmd-note message "printing message..." call-process "-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"] 23))
  159. (defun mh-put-msg-in-seq (prefix-provided from to) "\
  160. Add MESSAGE(s) (default: displayed message) to SEQUENCE.
  161. If (optional) prefix argument supplied, then prompt for sequence to use
  162. instead of message." (interactive (byte-code "ƒÃÄÅ \"!‚ÆÂ!ÄÇ \"E‡" [current-prefix-arg mh-narrowed-to-seq t mh-seq-to-msgs mh-read-seq "Add messages from" mh-get-msg-num "Add to"] 8)) (byte-code "ƈ ƒ Ç \"‚È \"ˆÉ ‡" [current-prefix-arg mh-narrowed-to-seq t prefix-provided from to nil mh-add-msg-list-to-seq mh-add-msg-to-seq mh-next-msg] 4))
  163. (defun mh-rescan-folder (range) "\
  164. Rescan a folder after optionally processing the outstanding commands.
  165. If (optional) prefix argument supplied, prompt for the range of messages to
  166. display. Otherwise show the entire folder." (interactive (byte-code "ƒ
  167. ÁÂ!‚ ÃC‡" [current-prefix-arg read-string "Range [all]? " "all"] 2)) (byte-code "ĈʼnˆÆ
  168. \"‡" [current-prefix-arg mh-next-direction mh-current-folder range nil forward mh-scan-folder] 3))
  169. (defun mh-redistribute (to cc msg) "\
  170. Redistribute a letter." (interactive (byte-code "ÁÂ!ÁÃ!ÄÀ!E‡" [t read-string "Redist-To: " "Redist-Cc: " mh-get-msg-num] 6)) (byte-code "ƈË
  171. ! Ì‹*‡" [t msg-filename msg folder mh-current-folder mh-redist-full-contents nil to cc mh-progs mh-user-path mh-msg-filename ((byte-code "Éʃ
  172. ‚ Â\"ˆËÌ!ˆÍÎ Ï#ˆÐ Ñ\"?…$ÍÒ Ï#ˆÓeÔÂ#ˆÕ ˆÖ×!ˆØÙÂÌÂÚÛÜ $&ˆÝÞßàáÛâ #&ˆÖã!‡" [mh-redist-full-contents msg-filename nil to cc mh-progs mh-user-path msg folder mh-read-draft "redistribution" mh-goto-header-end 0 insert "Resent-To: " "
  173. " equal "" "Resent-cc: " mh-clean-msg-header "^Message-Id:\\|^Received:\\|Return-Path:" save-buffer message "Redistributing..." call-process "/bin/sh" "-c" format "mhdist=1 mhaltmsg=%s %s/send -push %s/draft" mh-annotate-msg "R" "-component" "Resent:" "-text" "\"%s %s\"" "Redistributing...done"] 21))] 3))
  174. (defun mh-write-msg-to-file (msg file) "\
  175. Append MESSAGE to the end of a FILE." (interactive (byte-code "ÁÀ!ÂÃÄ!!D‡" [t mh-get-msg-num expand-file-name read-file-name "Save message in file: "] 5)) (byte-code "ňÆ
  176. B‰ˆÇ !ŠÈÉ!qˆÊed\"ˆË !ˆÌed
  177. #))‡" [t mh-last-destination file file-name msg nil write mh-msg-filename get-buffer-create " *mh-temp*" delete-region insert-file-contents append-to-file] 8))
  178. (defun mh-search-folder nil "\
  179. 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))
  180. (defun mh-send (to cc subject) "\
  181. Compose and send a letter." (interactive "sTo:
  182. sCc:
  183. sSubject: ") (byte-code "ÃˆÄ ˆÅ
  184. #‡" [to cc subject nil delete-other-windows mh-send-sub] 5))
  185. (defun mh-send-other-window (to cc subject) "\
  186. Compose and send a letter in another window.." (interactive "sTo:
  187. sCc:
  188. sSubject: ") (byte-code "ňÁÆ
  189. #)‡" [pop-up-windows t to cc subject nil mh-send-sub] 4))
  190. (defun mh-send-sub (to cc subject) "\
  191. Do the real work of composing and sending a letter.
  192. Expects the TO, CC, and SUBJECT fields as arguments." (byte-code "ÈÁ!… ÉÊ!ˆËÌÍÎÏ
  193. \"!ƒÎÏ
  194. \"‚1ÍÎÏ \"!ƒ.ÎÏ \"‚1ÐÑ!\"…JÒÓ Ô Õ&ˆÖÇ!ˆdbˆÉ×!ˆØÙÇ &)‡" [folder mh-current-folder mh-user-path mh-lib to subject cc nil boundp message "Composing a message..." mh-read-draft "message" file-exists-p format "%scomponents" error "Can't find components" mh-insert-fields "To:" "Subject:" "Cc:" set-buffer-modified-p "Composing a message...done" mh-compose-and-send-mail ""] 20))
  195. (defun mh-show (msg) "\
  196. Show MESSAGE (default: displayed message)." (interactive (byte-code "ÁÀ!C‡" [t mh-get-msg-num] 2)) (byte-code "ˆ‰ˆÊ‰ˆ ËÌ!#ˆÍ !ˆÎ ˆÍ!ˆÍ !ˆÏÐ Z!ˆÑÒ!ˆ B‰ )‡" [t mh-summarize nil mode-name folder mh-current-folder msg mh-show-buffer mh-summary-height mh-seen-list "Mh-Show" mh-display-msg mh-msg-filename switch-to-buffer-other-window delete-other-windows shrink-window window-height recenter 1] 11))
  197. (defun mh-sort-folder nil "\
  198. 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))
  199. (defun mh-toggle-summarize nil "\
  200. Turn the summary mode of displaying messages on or off." (interactive) (byte-code "È?‰ˆƒÄ ˆÅ‰ˆÆÇÈ É\"!‚%ʉˆËÌÂ!!‡" [mh-summarize mode-name t nil delete-other-windows "Mh-Summarize" recenter / window-height 2 "Mh-Show" mh-show mh-get-msg-num] 7))
  201. (defun mh-undo (prefix-provided msg-or-seq) "\
  202. Undo the deletion or move of the specified MESSAGE(s)
  203. (default: displayed message).
  204. If (optional) prefix argument is supplied, then prompt for sequence to use
  205. instead of message." (interactive (byte-code "ƒ ÃÄ \"‚ÅÂ!D‡" [current-prefix-arg mh-narrowed-to-seq t mh-read-seq "Undo" mh-get-msg-num] 4)) (byte-code "ȈÉÊ!ƒ1 ƒËÌÍ !\"ˆÎ Ï #‚.Ð \"‰ˆÑ Ò\"ˆÓ Ï #‚YÉÔ!ƒX ƒJËÕÍ !\"ˆÎ Ï #‚UËÖ\"ˆÓ Ï #‚Yȇ" [current-prefix-arg mh-narrowed-to-seq t prefix-provided msg-or-seq mh-cmd-note mh-delete-list 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 delq mh-remove-msg-from-seq deleted mh-notate "^....\\^" (lambda (msg) (byte-code "ÁÂ\"‡" [mh-move-list mapc (lambda (dest) (byte-code " \"‡" [msg dest mh-remove-msg-from-seq] 3))] 3)) (lambda (dest) (byte-code " \"‡" [msg-or-seq dest mh-remove-msg-from-seq] 3))] 16))
  206. (defun mh-undo-folder nil "\
  207. 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." sit-for 2] 5))
  208. (defun mh-visit-folder (folder range) "\
  209. Visit FOLDER and display RANGE of messages." (interactive (byte-code "ÁÂÃÀ#ÄÅ!D‡" [t mh-prompt-for-folder "Visit" "+inbox" read-string "Range [all]? "] 4)) (byte-code "ÃˆÄ Å
  210. Æ\"ƒÇ‚
  211. \"ˆÈ ‡" [t folder range nil mh-scan-folder equal "" "all" delete-other-windows] 5))
  212. (defun mh-widen nil "\
  213. Remove restrictions from the current folder, thereby showing all messages." (interactive "") (byte-code "ÁˆÁÃed\"ˆÄ ˆÅ )ˆÁ‰‡" [buffer-read-only nil mh-narrowed-to-seq delete-region widen mh-make-folder-mode-line] 5))
  214. (defun mh-delete-a-msg (msg) "\
  215. Delete the MESSAGE." (byte-code "ŠÅÁ\"ˆÆÇ!…ÈÉ\"ˆ
  216. B‰ˆÊËÃ#ˆÌÍ #)‡" [msg nil mh-delete-list t mh-cmd-note mh-goto-msg looking-at "....\\^" error "Message %d already moved. Undo move before deleting." mh-add-msg-to-seq deleted mh-notate 68] 8))
  217. (defun mh-move-a-msg (msg destination) "\
  218. Move the MESSAGE to the FOLDER." (byte-code "ŠÆÁ\"ˆÇÈ!ƒÉÊ\"‚+ >?… B‰ˆË Â#ˆÌÍ #)‡" [msg nil t destination mh-move-list mh-cmd-note mh-goto-msg looking-at "....D" error "Message %d is already deleted. Undo delete before moving." mh-add-msg-to-seq mh-notate 94] 8))
  219. (defun mh-display-msg (msg-num msg-filename show-buffer) "\
  220. Display the message NUMBER and PATHNAME in BUFFER." (byte-code "Í!?… ÎÏ \"ˆÐ
  221. !ˆÑ \"?…vÒ ˆÓ ˆÔed\"ˆ ƒ0ÕÖר$‚4ÙÅ\"ˆebˆƒJÚe#ˆeb‚ZÅ ÛÜÊÅ#ˆÝ ˆÞß!)ˆàÊ!ˆ‰ˆáÊ!ˆâãä \"åãæ \"F‰ ‡" [msg-filename msg-num show-buffer buffer-file-name mh-use-mhl t mh-clean-message-header mh-invisible-headers mh-visible-headers case-fold-search nil mode-line-buffer-identification folder file-exists-p error "Message %d does not exist." switch-to-buffer equal clear-visited-file-modtime unlock-buffer delete-region 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 set-mark "mh-e: {%b} " format "%s" "/" "%d"] 22))
  222. (defun mh-clean-msg-header (start invisible-headers visible-headers) "\
  223. Flush extraneous lines in a message header, from the given POINT to the
  224. end of the message header. If VISIBLE-HEADERS is non-nil, it contains a
  225. regular expression specifying the lines to display, otherwise INVISIBLE-HEADERS
  226. contains a regular expression specifying lines to delete from the header." (byte-code "ŒbˆÅÆÁÂ#…ÇÈ!ˆÉ`\"ˆebˆ ƒL`dW…IÊ ˆË !ƒ1ÌÍ!‚EÎÍ!ˆËÏ!…EÊ ˆÎÍ!ˆ‚5ˆ‚‚oÐ ÁÂ#…oÊ ˆÎÍ!ˆËÏ!…kÊ ˆÎÍ!ˆ‚[ˆ‚LˆÑ )‡" [start nil t visible-headers invisible-headers search-forward "
  227. " backward-char 2 narrow-to-region beginning-of-line looking-at forward-line 1 kill-line "^[ ]+" re-search-forward unlock-buffer] 19))
  228. (defun mh-read-draft (use initial-contents) "\
  229. Read draft file into draft buffer. USE is a message used for prompting
  230. about the intended use of the message. INITIAL-CONTENTS is filename that
  231. is read into an empty buffer, or NIL if buffer should not be modified.
  232. Returns T if the buffer is set to the contents of this file, NIL otherwise." (byte-code "ÆÇ!ˆÈ …ÉÊ!ƒËÀ!‚ÌÍ!ˆÎÏ
  233. \"‰ˆÐ ˆÑ ˆÒÎÏ
  234. \"!…5ÓÎÏ
  235. \"!ˆ …HÔÕ !†HÉÎÖ \"!?ƒX×ed\"ˆÓ !ˆÅ‚YÀØÙ!ˆ‡" [nil buffer-file-name mh-user-path initial-contents use t pop-to-buffer "draft" buffer-modified-p y-or-n-p "Draft is modified; kill anyways? " set-buffer-modified-p error "Draft is not killed." format "%sdraft" clear-visited-file-modtime unlock-buffer file-exists-p insert-file-contents zerop buffer-size "The file 'draft' exists. Use for %s? " delete-region auto-save-mode 1] 21))
  236. (defun mh-next-msg nil "\
  237. 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))
  238. (defun mh-maybe-show (msg) "\
  239. If the scan listing is not summarized, show the message pointed to
  240. by the cursor." (byte-code "?…Â !‡" [mh-summarize msg mh-show] 2))
  241. (defun mh-make-folder (name) "\
  242. Create and initialize a new mail folder called NAME and make it the
  243. current folder." (byte-code "Ç!ˆÈp!ˆÉ ˆÂ‰ˆÊed\"ˆËÌÆÍÎ\"ÏÍÐ ÑÂO#ÒÄÓÔÕÂÖÂ×ÂØÂÙÚÛÂÜÂÝÂ&ˆÞ ˆÄ‰ˆß‰ˆŠÇ!ˆÈp!)‡" [name buffer-read-only nil mh-user-path t mode-name mh-show-buffer switch-to-buffer buffer-flush-undo kill-all-local-variables delete-region make-local-vars mh-current-folder 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-first-msg-num mh-last-msg-num mh-folder-mode "Mh-Summarize"] 33))
  244. (defun make-local-vars (&rest pairs) "\
  245. Take VARIABLE-VALUE pairs and makes local variables initialized to the
  246. value." (byte-code "…Á@!ˆ@A@LˆAA‰ˆ‚‡" [pairs make-local-variable] 4))
  247. (defun mh-folder-mode nil "\
  248. Major mode for \"editing\" an MH folder scan listing.
  249. Messages can be marked for refiling and deletion. However, both actions
  250. are defered until you request execution with \\[mh-execute-commands].
  251. \\{mh-folder-mode-map}
  252. A prefix argument (\\[universal-argument]) to delete, move, list, or undo applies the action to a message sequence.
  253. Variables controlling mh-e operation are (defaults in parentheses):
  254. mh-clean-message-header (nil)
  255. Non-nil means remove header lines matching the regular expression
  256. specified in mh-invisible-headers from messages.
  257. mh-use-mhl (nil)
  258. Non-nil means use mhl to format displayed messages.
  259. mh-lpr-command-format (\"lpr -p -J '%s'\")
  260. Format for command used to print a message on a system printer.
  261. mh-summary-height (4)
  262. Number of lines in the summary window.
  263. mh-ins-buf-prefix (\">> \")
  264. String to insert before each non-blank line of a message as it is
  265. inserted in a letter being composed." (byte-code "Ä!ˆÅ‰ˆÆ‰ˆÇÃ!… …È !‡" [mh-folder-mode-map major-mode mode-name mh-folder-mode-hook use-local-map mh-folder-mode "mh-folder" boundp funcall] 4))
  266. (defun mh-scan-folder (folder range) "\
  267. Scan the FOLDER over the RANGE. Return in the folder's buffer." (byte-code "Æ!?ƒ Ç!‚'
  268. † …#ÈÉ!ƒ!Ê!‚#Ë ˆÌ!ˆÍ !ˆÎed\"ÏU…LÐ Ñ\"ƒCÒÓ\"‚HÒÔ #ˆÕÖ!ˆ×Å!ˆØ ‡" [folder t mh-delete-list mh-move-list range nil get-buffer mh-make-folder y-or-n-p "Process outstanding commands (or lose them)? " 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-unmark-all-headers mh-goto-cur-msg] 15))
  269. (defun mh-regenerate-headers (range) "\
  270. Replace buffer with scan of its contents over range RANGE." (byte-code "ÁÄÅÆÇ \"!ˆÈ ˆÉed\"ˆÊËÁÌÍÇ
  271. &ˆebˆÎÏ!ƒ,ÐÑ!‚5ÎÒ!†5ÐÑ!ˆÓ ˆÄÅÔÇ \"!)‡" [buffer-read-only nil range t message format "scanning %s..." buffer-name delete-other-windows delete-region mh-exec-cmd-output "scan" "-noclear" "-noheader" looking-at "scan: no messages in" keep-lines "^[ ]*[0-9]" "scan: " mh-make-folder-mode-line "scanning %s...done"] 17))
  272. (defun mh-get-new-mail (maildrop-name) "\
  273. Read new mail from a maildrop into the current buffer.
  274. Return t if there was new mail, nil otherwise. Return in the current buffer." (byte-code "Á`Ç ƒÈÉÊ #‚ÈËÊ \"!ˆÌÁ!ˆÍ‰ˆÎÏ!ˆdbˆ` ƒ=ÐÑÁÊ ÒÓ !Ô&‚AÐÑÁ\"ˆÇ ƒPÈÕÊ #‚UÈÖÊ \"!ˆ bˆ×Ø!ƒ„ÙÚ!ˆÛ ˆ
  275. bˆÇÜ ƒtÝ‚uÞ ƒ} ‚~Þ#ˆÁ‚£×ß!ƒ˜Û ˆ
  276. bˆÇà!ˆÁ‚£ÙÚ!ˆÛ ˆá ˆÆ)*‡" [buffer-read-only nil point-before-inc maildrop-name mh-next-direction start-of-inc t message format "inc %s -file %s..." buffer-name "inc %s..." mh-unmark-all-headers forward flush-lines "^inc:\\|^scan:" mh-exec-cmd-output "inc" "-file" expand-file-name "-truncate" "inc %s -file %s...done" "inc %s...done" looking-at "inc: no mail" keep-lines "^[ ]*[0-9]" mh-make-folder-mode-line "No new mail%s%s." " in " "" "inc:" "inc error" mh-goto-cur-msg] 27))
  277. (defun mh-make-folder-mode-line (&optional annotation) "\
  278. Set the fields of the mode line for a folder buffer.
  279. The optional ANNOTATION string is displayed after the folder's name." (byte-code "ŠebˆÇÁ!‰ˆÈed\"ÁdbˆÉÊ!ˆÇÁ!‰ˆË̃-ËÍ\"‚.Î
  280. ÏUƒ9ЂK
  281. ÊVƒGËÑ #‚KËÒ\"$C‰*)‡" [mh-first-msg-num nil lines case-fold-search mh-last-msg-num mode-line-buffer-identification annotation mh-get-msg-num count-lines previous-line 1 format "mh-e: {%%b%s} [%d message%s]" "/%s" "" 0 "s" "s (%d - %d)" " (%d)"] 13))
  282. (defun mh-unmark-all-headers (remove-all-flags) "\
  283. Remove all + flags from the headers, and if called
  284. with a non-nil argument, remove 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))
  285. (defun mh-goto-cur-msg nil "\
  286. 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 message "No current message" mh-notate 43 4 recenter 0 mh-maybe-show] 9))
  287. (defun mh-pack-folder nil "\
  288. Close and pack the current folder." (byte-code "ÁÃÄ!ˆÅ
  289. !ˆÃÆ!ˆŠÇÈÉ
  290. Ê$)ˆËÌ!ˆÃÍ!)‡" [buffer-read-only nil mh-current-folder message "closing folder..." mh-process-commands "packing folder..." mh-exec-cmd-quiet " *mh-temp*" "folder" "-pack" mh-regenerate-headers "all" "packing done"] 8))
  291. (defun mh-process-commands (buffer) "\
  292. Process outstanding commands for the buffer BUFFER." (byte-code "ËÌ!ˆqˆÂÍ !ˆ ….ÎÏ! ?…ЉˆÑÒÓÔÕE Ö ×E#\")ˆØÙ\"ˆ…LÑÚÓÛÜÝ\"D\"\"ˆÞ!ˆßÂ!ƒcÚÕßÂ!àáâã&‚tä ÔV…tÚÕàá×å&ˆŠ qˆÂ‰
  293. )ˆÂ‰)ˆËæ!‡" [buffer buffer-read-only nil mh-seq-list mh-seen-list unseen-seq mh-current-folder mh-move-list mh-delete-list mh-show-buffer buffer-file-name message "Processing deletes and moves..." 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É
  294. Ê !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"] 21))
  295. (defun mh-delete-scan-msgs (msgs) "\
  296. Delete the scan listing lines for each of the msgs in the LIST." (byte-code "ŠebˆÁÂÃÄ#!)‡" [msgs flush-lines mapconcat mh-msg-search-pat "\\|"] 5))
  297. (defun mh-letter-mode nil "\
  298. Mode for composing letters in mh-e.
  299. \\{mh-letter-mode-map}" (byte-code "Æ ˆÇÀ!ˆÈP‰ˆÇÁ!ˆÈ P‰ˆÉ
  300. !ˆÊ‰ˆË‰ˆÌÅ!…* …0Í !‡" [paragraph-start paragraph-separate mh-letter-mode-map major-mode mode-name mh-letter-mode-hook text-mode make-local-variable "^[ ]*[-_][-_][-_]+$\\|" use-local-map mh-letter-mode "mh-letter" boundp funcall] 7))
  301. (defun mh-to-field nil "\
  302. Move point to the end of the header field indicated by the previous
  303. keystroke.Create the field if it does not exist. Set the mark to the
  304. point before moving." (interactive "") (byte-code "ÃˆÄ ˆÅ Æ\"AÇÂ\"ƒÈÉ!?…ÊË!‚4ebˆÌÍ!ˆÎÏ!ˆÊÐÑ\"!ˆÒÏ!)‡" [target last-input-char t nil expand-abbrev assoc ((116 . "To:") (115 . "Subject:") (99 . "Cc:") (98 . "Bcc:") (102 . "Fcc:")) mh-position-on-field looking-at "[ ]" insert-string " " re-search-forward "^To:" forward-line 1 format "%s
  305. " backward-char] 11))
  306. (defun mh-insert-signature nil "\
  307. Insert the file ~/.signature at the current point" (interactive "") (byte-code "ÀˆÁÂ!‡" [nil insert-file-contents "~/.signature"] 2))
  308. (defun mh-check-whom nil "\
  309. List recipients of the current letter." (interactive) (byte-code "ˆà ÄÁ!ˆÅ ˆÆÇ!ˆÈÉ!ˆÊp!ˆËed\"ˆÌÍÁ#ˆÎÏ!ˆÆÐ!)‡" [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 delete-region mh-exec-cmd-output "whom" other-window -1 "Checking recipients...done"] 11))
  310. (defun mh-make-pick-template nil "\
  311. Initialize the current buffer with a template for a pick pattern." (byte-code "Âed\"ˆÃ ˆÄÅ!ˆÆÇÈÉÊËÌ&ˆÍ ˆÎ!ˆÏC‰ˆebˆÐ ‡" [mh-pick-mode-map mode-line-buffer-identification delete-region kill-all-local-variables make-local-variable mh-searching-folder insert "From:
  312. " "To:
  313. " "Cc:
  314. " "Date:
  315. " "Subject:
  316. " "---------
  317. " mh-letter-mode use-local-map "mh-e: {%b} Pick Pattern" end-of-line] 10))
  318. (defun mh-do-pick-search nil "\
  319. Find messages in current folder matching qualifications in current buffer.
  320. Put messages found in a sequence named `search'." (interactive) (byte-code "ÄˆÊ 
  321. ÄÄŠ qˆËÌ#‰)ˆÍÎ!ˆebˆÏ!‰…DÐ ÑÒÓ BÔ ÕÖ×%\"#‰ˆÖ‰ˆ‚!ˆÍØ!ˆÙ !ˆÚ ˆÛÑÜ Ý\\#,‡" [pattern-buffer searching-buffer mh-searching-folder range nil pattern mh-first-msg-num mh-last-msg-num msgs mh-cmd-note buffer-name format "%d-%d" message "Searching..." mh-next-pick-field mh-seq-from-command search nconc "pick" list "-sequence" "search" "-list" "Searching...done" switch-to-buffer delete-other-windows mh-notate-seq 37 1] 16))
  322. (defun mh-next-pick-field (buffer) "\
  323. Return the next piece of a pick argument that can be extracted from the
  324. BUFFER. Returns nil if no pieces remain." (byte-code "qˆÂmƒ ÂgÇÈÃÂ#ƒ7ÉÊËÌÍÎ!ÏÎ!\"!\"ÌÍÐ!ÏÐ!\"ÑÎ!ˆ D*‚gÇÒÃÂ#ƒfÓÎ!ˆÌ`d\"GÔV…WÕÖ\"?ƒa×D‚bÃ)‚gÃ)‡" [buffer case-fold-search t nil component pat body 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 "
  325. " "-search"] 16))
  326. (defun mh-compose-and-send-mail (send-args sent-from-folder sent-from-msg to subject cc &optional annotate-char annotate-field search-prefix) "\
  327. Edit and compose a draft message and send or save it.
  328. SENT-FROM-FOLDER is buffer containing scan listing of current folder, or
  329. nil if none exists.
  330. SENT-FROM-MSG is the message number or sequence name or nil.
  331. SEND-ARGS is an optional argument passed to the send command.
  332. The TO, SUBJECT, and CC fields are passed to the mh-compose-letter-hook.
  333. If ANNOTATE-CHAR is non-null, it is used to notate the scan listing of the
  334. message. In that case, the ANNOTATE-FIELD is used to build a string
  335. for mh-annotate-msg." (byte-code "ËÌ!ˆÍ ˆÎÏÐ Ñ
  336. Ò Ó Ô ƒ ‚Õ& ˆÖC‰ˆ×Ç!…-…:Ø 
  337. $‡" [send-args sent-from-folder sent-from-msg annotate-field annotate-char search-prefix mode-line-buffer-identification mh-compose-letter-hook to subject cc 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 "" "mh-e: {%b} Mail/draft" boundp funcall] 15))
  338. (defun mh-send-letter (&optional arg) "\
  339. Send the draft letter in the current buffer.
  340. If (optional) prefix argument supplied, monitor delivery." (interactive "P") (byte-code "̈ÍÀ!ˆÎ ˆÏÐ!ˆÁ Ñ  ƒ=ÒÓ!ˆÔed\"ˆ ƒ1ÕÖÀרÙ
  341. &‚:ÕÖÀרÙ
  342. &‚T ƒMÚÖØÙÛ
  343. &‚TÚÖØÙÛ
  344. %ˆ …xÜ ÝÞßàáßâ ã#!áßâ ä#!#&ˆ ?†�åæ!…§ 
  345. ç !ˆ
  346. …¦è ˆé
  347. !ˆ …¦ê !*ˆÏë!*‡" [t buffer-name file-name arg mh-send-args mh-annotate-char mh-sent-from-msg mh-sent-from-folder mh-annotate-field mh-annotate-search-prefix sent-from-folder sent-from-msg nil set-buffer-modified-p save-buffer message "Sending..." buffer-file-name pop-to-buffer "MH mail delivery" kill-region mh-exec-cmd-output "send" "-watch" "-unique" "-nodraftfolder" mh-exec-cmd-demon "-noverbose" mh-annotate-msg "-component" "-text" format "\"%s %s\"" mh-get-field "%s%s" "To:" "Cc:" y-or-n-p "Kill draft buffer? " kill-buffer delete-other-windows switch-to-buffer mh-maybe-show "Sending...done"] 28))
  348. (defun mh-insert-letter (prefix-provided folder msg) "\
  349. Insert a message from any folder into the current letter.
  350. Removes the message's headers using mh-invisible-headers.
  351. Prefixes each non-blank line with mh-ins-buf-prefix (default \">> \").
  352. If (optional) prefix argument supplied, do not indent and do not delete
  353. headers.
  354. Leaves the point before the letter and the mark after it." (interactive (byte-code "ÄÅ Â#ÆÇÈ ƒÇÉ \"‚Ê\"!E‡" [current-prefix-arg mh-sent-from-folder nil mh-sent-from-msg mh-prompt-for-folder "Message from" read-input format "Message number%s: " " [%d]" ""] 9)) (byte-code "ˆ`Ì Í\"…ÎÏ \"‰ˆÐÑÒÓÎÔÕÂO $$ˆ?…>Ö  
  355. #ˆ× Ø \"ˆÙ !ˆÚ ˆÛ )‡" [current-prefix-arg mh-sent-from-folder nil mh-sent-from-msg start msg mh-user-path folder prefix-provided mh-invisible-headers mh-visible-headers mh-ins-buf-prefix equal "" format "%d" mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" "%s%s/%s" 1 mh-clean-msg-header narrow-to-region mark mh-insert-prefix-string widen exchange-point-and-mark] 12))
  356. (defun mh-insert-cur-msg nil "\
  357. Insert the currently displayed message into the current draft buffer.
  358. Prefixes each non-blank line with the string mh-ins-buf-prefix.
  359. If there is a region set in the message's buffer, only the region will
  360. be inserted. Otherwise, the region from (point) to the end of the draft
  361. buffer will be grabbed." (interactive) (byte-code "LjÈÀ!… … ƒD`pqˆ qˆÉ ƒ'Ê`É \"‚+Ê`d\" qˆË
  362. \"ˆÌ !ˆÍ!ˆÎ )*‚GÏÐ!‡" [mh-sent-from-folder mh-sent-from-msg to-point to-buffer mh-show-buffer mh-ins-str mh-ins-buf-prefix nil boundp mark buffer-substring narrow-to-region insert-string mh-insert-prefix-string widen error "There is no current message."] 11))
  363. (defun mh-insert-prefix-string (ins-string) "\
  364. Preface each line in the current buffer with STRING." (byte-code "ebˆm?…Á!ˆÂÃ!ˆ‚ˆeb‡" [ins-string insert-string forward-line 1] 4))
  365. (defun mh-fully-kill-draft nil "\
  366. Kill the draft message file and the draft message buffer.
  367. Use \\[kill-buffer] if you don't want to delete the draft message file." (interactive "") (byte-code "ÄˆÅÆ!ƒ7 ÇÈ !…ÉÈ !ˆÊÄ!ˆËÌ !ˆ…3Í ˆÎ!ˆ
  368. …3Ï
  369. !*‚:ÐÑ!‡" [sent-from-folder mh-sent-from-folder sent-from-msg mh-sent-from-msg nil y-or-n-p "Kill draft message? " file-exists-p buffer-file-name delete-file set-buffer-modified-p kill-buffer buffer-name delete-other-windows switch-to-buffer mh-maybe-show error "Message not killed"] 13))
  370. (defmacro mh-seq-name (pair) (byte-code "ÁD‡" [pair car] 2))
  371. (defmacro mh-seq-msgs (pair) (byte-code "ÁD‡" [pair cdr] 2))
  372. (defun mh-seq-to-msgs (seq) "\
  373. Return the messages in sequence SEQ." (byte-code "Â \"A‡" [seq mh-seq-list assoc] 3))
  374. (defun mh-msg-to-seq (msg) "\
  375. Given a MESSAGE number, return the first sequence in which it occurs." (byte-code " …
  376. @A>?…A‰ˆ‚ˆ@@)‡" [l mh-seq-list msg] 3))
  377. (defun mh-read-seq (prompt &optional default) "\
  378. Read and return a sequence name from the minibuffer, prompting with
  379. the string PROMPT and supplying the optional DEFAULT.
  380. % defaults to the sequences containing the current message.
  381. Makes sure that the sequence is known to MH commands." (byte-code "ÆÇÈ É
  382. ƒÇÊË
  383. !\"‚Ì$Í !\"ÎÏ\"ƒ(ÐÑÅ!!‚6ÎÌ\"ƒ3
  384. ‚6Ò!Ó Ô !\"ˆ ))‡" [input prompt default mh-seq-list seq 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))
  385. (defun mh-seq-names (seq-list) "\
  386. Return an alist of the names of the SEQUENCES." (byte-code "ÁÂ\"‡" [seq-list mapcar (lambda (entry) (byte-code "Â@!ÁB‡" [entry nil symbol-name] 3))] 3))
  387. (defun mh-seq-from-command (folder seq command) "\
  388. In FOLDER, make a sequence named SEQ by executing COMMAND." (byte-code "ÁÊɋˆqˆÊ!‰ˆBB‰ˆ)*‡" [msgs nil case-fold-search t command num folder mh-seq-list seq ((byte-code "ÅÆÇB\"ˆebˆÈÉÁÂ#….ÊËÌÍ!ÎÍ!\"!Ï !?…) B‰)ˆ‚
  389. ‡" [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)) nreverse] 3))
  390. (defun mh-remove-seq (seq) "\
  391. Delete the sequence SEQ." (byte-code "Ä
  392. \"Å Æ Ç\\#ˆÈ
  393. \"‰)‡" [entry seq mh-seq-list mh-cmd-note assoc mh-notate-seq 32 1 delq] 6))
  394. (defun mh-remove-msg-from-seq (msg seq &optional do-not-mark) "\
  395. Remove MESSAGE from the sequence SEQ. If optional FLAG is
  396. non-nil, do not mark the message as being part of a sequence." (byte-code "Å \"…ÆÇ
  397. A\"\")ˆ ?…È
  398. É Ê\\#‡" [seq mh-seq-list msg do-not-mark mh-cmd-note assoc setcdr delq mh-notate 32 1] 8))
  399. (defun mh-add-msg-to-seq (msg seq &optional do-not-mark) "\
  400. Add MESSAGE to the SEQUENCE. If optional FLAG is non-nil,
  401. do not mark the message as being part of a sequence." (byte-code "Æ
  402. \" ?…Ç È É\\#ˆ?ƒ\" CB
  403. B‰‚)Ê AB\")‡" [seq-list seq mh-seq-list do-not-mark msg mh-cmd-note assoc mh-notate 37 1 setcdr] 6))
  404. (defun mh-add-msg-list-to-seq (msgs seq &optional do-not-mark) "\
  405. Add the messages in LIST to the SEQUENCE. If optional FLAG is non-nil,
  406. do not mark the messages as being part of a sequence." (byte-code "ÁÂ\"‡" [msgs mapc (lambda (msg) (byte-code "Ã
  407. #‡" [msg seq do-not-mark mh-add-msg-to-seq] 4))] 3))
  408. (defun mh-rename-seq (seq new-name) "\
  409. Rename a SEQUENCE to have a new NAME." (interactive "SOld sequence name:
  410. SNew name: ") (byte-code "ĈÅ
  411. \"ƒÆ \"‚ÇÈÉ !\")‡" [old-seq seq mh-seq-list new-name nil assoc rplaca error "Sequence %s does not exists" symbol-name] 6))
  412. (defun mh-notate-seq (seq notation offset) "\
  413. Mark all messages in the sequence SEQ with the NOTATION at character
  414. OFFSET." (byte-code "ÃÄ
  415. $‡" [seq notation offset mh-map-to-seq-msgs mh-notate] 5))
  416. (defun mh-map-to-seq-msgs (func seq &rest args) "\
  417. Invoke the function FUNC at each message in the sequence SEQ, passing
  418. the remaining ARGS as arguments." (byte-code "Ä !…Å@!ˆÆ
  419. @ B\"ˆA‰ˆ‚)‡" [msgs seq func args mh-seq-to-msgs mh-goto-msg apply] 7))
  420. (defun mh-map-over-seqs (func seq-list) "\
  421. Apply the function FUNC to each element in the sequence LIST,
  422. passing the sequence name and a list of messages as arguments." (byte-code "… @@@A#ˆA‰ˆ‚‡" [seq-list func funcall] 5))
  423. (defun mh-process-seq-commands (seq-list) "\
  424. Process outstanding sequence commands for the sequences in SEQ-LIST." (byte-code "ÁÂ\"‡" [seq-list mh-map-over-seqs mh-process-seq] 3))
  425. (defun mh-process-seq (seq msgs) "\
  426. Mark sequence SEQ to contain MSGS." (byte-code "ÃÄ!ÅÆOÇ\"?…# …#ÈÉÊËÌ
  427. ÍÎÏÐ\"Ñ& \"\"‡" [seq msgs mh-current-folder equal symbol-name 0 1 "+" apply mh-exec-cmd nconc list "mark" "-zero" "-seq" format "%s" "-add"] 13))
  428. (defun mh-copy-seq-to-point (seq location) "\
  429. 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))
  430. (defun mh-copy-line-to-point (msg location) "\
  431. 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))
  432. (defun mh-exec-cmd (command &rest args) "\
  433. Execute MH command COMMAND with ARGS. Any output is shown to the user." (byte-code "Å‹‡" [mh-progs command nil t args ((byte-code "ÅÆ!ˆÇed\"ˆÈÉÊËÌ #ÂÃÂFÍ !\"\"ˆÎ ÏV…%ÐÑ!‡" [mh-progs command nil t args switch-to-buffer-other-window " *mh-temp*" delete-region apply call-process nconc format "%s%s" mh-list-to-string buffer-size 0 sit-for 5] 10))] 1))
  434. (defun mh-exec-cmd-quiet (buffer command &rest args) "\
  435. In BUFFER, execute MH command COMMAND with ARGS. Return in buffer, if
  436. one exists." (byte-code ";… Å!ˆÆed\"ˆÇÈÉÊË
  437. #ÃÃFÌ !\"\"‡" [buffer mh-progs command nil args switch-to-buffer delete-region apply call-process nconc format "%s%s" mh-list-to-string] 10))
  438. (defun mh-exec-cmd-output (command display &rest args) "\
  439. Execute MH command COMMAND with DISPLAY flag and ARGS putting the output
  440. into buffer after point. Set mark after inserted text." (byte-code "Æ`À\"ˆÇÈÉÊË
  441. #ÃÀ FÌ !\"\"ˆÍ ‡" [t mh-progs command nil display args push-mark apply call-process nconc format "%s%s" mh-list-to-string exchange-point-and-mark] 9))
  442. (defun mh-exec-cmd-demon (command &rest args) "\
  443. Execute MH command COMMAND with ARGS. Any output from command is displayed
  444. in an asynchronous pop-up window." (byte-code "ÅÆÇÈÁÉ
  445. \"EÊ !\"\"ËÌ\")‡" [process nil command mh-progs args apply start-process nconc "mh-output" expand-file-name mh-list-to-string set-process-filter mh-process-demon] 8))
  446. (defun mh-process-demon (process output) "\
  447. Process demon that puts output into a temporary buffer." (byte-code "ÁÂ!ˆcˆÃÄ!‡" [output pop-to-buffer " *mh-temp*" sit-for 2] 3))
  448. (defun mh-exec-lib-cmd-output (command &rest args) "\
  449. Execute MH library command COMMAND with ARGS. Put the output into
  450. buffer after point. Set mark after inserted text." (byte-code "Å`À\"ˆÆÇÈÉÊ
  451. #ÃÀÃFË !\"\"ˆÌ ‡" [t mh-lib command nil args push-mark apply call-process nconc format "%s%s" mh-list-to-string exchange-point-and-mark] 9))
  452. (defun mh-list-to-string (l) "\
  453. Flattens the list L and makes every element of the new list into a string." (byte-code "Á
  454. …j
  455. @?†a
  456. @9ƒÄÅ
  457. @\"B‰‚aÆ
  458. @!ƒ1ÄÇ
  459. @\"B‰‚aÈ
  460. @É\"†a
  461. @;ƒH
  462. @B‰‚a
  463. @<ƒ\\ÊËÌ
  464. @!!\"‰‚aÍÎ
  465. @\"ˆ
  466. A‰ˆ‚ˆË!)‡" [new-list nil l t format "%s" numberp "%d" equal "" nconc nreverse mh-list-to-string error "Bad argument %s"] 11))
  467. (defun mh-annotate-msg (msg buffer note &rest args) "\
  468. Mark the MESSAGE in BUFFER listing with the character NOTE and annotate
  469. the saved message with ARGS." (byte-code "ÅÆÇ
  470. BBB\"ˆŠqˆ 9ƒÈ É\\#‚%Ê É\\#)‡" [buffer msg args note mh-cmd-note apply mh-exec-cmd "anno" mh-notate-seq 1 mh-notate] 7))
  471. (defun mh-notate (msg notation offset) "\
  472. Marks MESSAGE with the character NOTATION at position OFFSET." (byte-code "ŠÆÁ\"…ÃÇ ˆ` \\bˆÈÉ!ˆ c))‡" [msg t buffer-read-only nil offset notation mh-goto-msg beginning-of-line delete-char 1] 4))
  473. (defun mh-prompt-for-folder (prompt default can-create) "\
  474. Prompt for a folder name with PROMPT. Returns the folder's name.
  475. DEFAULT is used if the folder exists and the user types return.
  476. If the CAN-CREATE flag is t, then a non-existant folder is made." (byte-code "ÈÉÊË \"ƒÌ‚ÈÍ \"#Ä ?…Î ‰ˆÏ ÄÄÐ%‰…7Ê
  477. Ë\"…7Ê Ë\"…?Ĉ‚ ˆÊ
  478. Ë\"†KÊ
  479. Ð\"ƒT ‰‚eÊ
  480. ÑÒOÐ\"?…eÈÓ
  481. \"‰ˆÔÈÕ
  482. ÒÄO#!? …}ÖÈ×
  483. \"!ƒ­ØÙ
  484. \"ˆÚÛÄÄÄÈÕ
  485. ÒÄO#%ˆØÜ
  486. \"ˆ
  487. C B‰ˆ
  488. ÒÄOC B‰‚Ï ƒ·ÝË!‚ÏÞ
  489. \"?…Ï
  490. C B‰ˆ
  491. ÒÄOC B‰)ˆ
  492. *‡" [prompt default name mh-folder-list nil new-file-p mh-user-path t format "%s folder%s" equal "" "? " " [%s]? " mh-make-folder-list 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] 27))
  493. (defun mh-make-folder-list nil "\
  494. Return a list of the user's folders.
  495. Result is in a form suitable for completing read." (interactive) (byte-code "ÁˆÅ‹‡" [list nil start t folder ((byte-code "ÅÆÇÈÉ$ˆebˆÁm?…/`ÊËÁÃ#ˆÌ
  496. `ÍZ\"ÎÏ \"CB‰))ˆ‚ ˆ)‡" [list nil start t folder mh-exec-cmd-quiet " *mh-temp*" "folders" "-fast" "-norecurse" search-forward "
  497. " buffer-substring 1 format "+%s"] 7))] 1))
  498. (defun mh-remove-folder-from-folder-list (folder) "\
  499. Remove FOLDER from the list of folders." (byte-code "ÃÄ ÅÂO\"\"‰‡" [mh-folder-list folder nil delq assoc 1] 5))
  500. (defun mh-get-msg-num (error-if-no-message) "\
  501. Return the message number of the displayed message. If the argument
  502. ERROR-IF-NO-MESSAGE is non-nil, then complain if the cursor is not
  503. 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))
  504. (defun mh-msg-search-pat (n) "\
  505. Return 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))
  506. (defun mh-msg-filename (msg) "\
  507. Returns a string containing the file name of the MESSAGE." (byte-code "ÂÃ #‡" [mh-folder-filename msg format "%s%d"] 4))
  508. (defun mh-msg-filenames (msgs folder) "\
  509. Return a string of filenames for MSGS in FOLDER." (byte-code "ÁÂÃ#‡" [msgs mapconcat (lambda (msg) (byte-code " P‡" [folder msg] 2)) " "] 4))
  510. (defun mh-find-path nil "\
  511. Set mh-user-path to the user's Mail directory from ~/.mh_profile." (byte-code "ÁÂÃ!‰Ä\"ƒʼn‚ÆÇ\"‰ˆÁÈÉOÊ\"?…,ÆËÌÍ!#‰‡" [mh-user-path equal mh-get-profile-field "Path:" "" "Mail/" format "%s/" 0 1 "/" "%s/%s" getenv "HOME"] 9))
  512. (defun mh-get-profile-field (field) "\
  513. Return FIELD from the user's .mh_profile file." (byte-code "Á‹‡" [field ((byte-code "ÁÂ!?…
  514. ÃÄ!ˆÅÆ!ˆÇed\"ˆÈÉÂ!!ˆÊ!‡" [field file-exists-p "~/.mh_profile" error "Cannot find ~/.mh_profile file. Run mh-install!" switch-to-buffer " *mh_temp*" delete-region insert-file-contents expand-file-name mh-get-field] 8))] 1))
  515. (defun mh-get-cur-msg (folder) "\
  516. Return the number of the 'cur' message in FOLDER." (byte-code "ŠÂqˆÃed\"ˆÄÅÀ Æ$ˆÇÈed\"!)‡" [nil folder " *mh_temp*" delete-region mh-exec-cmd-output "pick" "cur" string-to-int buffer-substring] 6))
  517. (defun mh-get-field (field) "\
  518. Find and return the value of field FIELD in the current buffer.
  519. Returns the empty string if the field is not in the message." (byte-code "ÁebˆÅ
  520. ÃÁ#?ƒÆ‚KÇÈ!ƒÆ‚KÉÊÃÁ#ˆËÌÍ!ÎÍ!\"`Ï ˆÇÐ!…=ÏÍ!ˆ‚0ˆÑÍ!ˆÒÓ
  521. Ë `\"#*)‡" [case-fold-search t field nil end-of-match search-forward "" looking-at "[ ]*$" re-search-forward "[ ]*\\([^
  522. ].*\\)$" buffer-substring match-beginning 1 match-end forward-line "[ ]" backward-char format "%s%s"] 16))
  523. (defun mh-insert-fields (&rest name-values) "\
  524. Insert the NAME-VALUE pairs in the current buffer.
  525. Do not insert any pairs whose value is the empty string." (byte-code "Á
  526. …C
  527. @
  528. A@Æ Ç\"?…8ebˆÈÉÊ \"ÅÁ#?ƒ1ËÌ!ˆÍ Î Ï$‚8Ð ˆÍÎ \"ˆ
  529. AA‰*ˆ‚)‡" [case-fold-search t name-values field-name value nil equal "" re-search-forward format "^%s" mh-goto-header-end 0 insert " " "
  530. " end-of-line] 10))
  531. (defun mh-position-on-field (field set-mark) "\
  532. Set point to the end of the line beginning with FIELD.
  533. Set the mark to the old value of point, if SET-MARK is non-nil." (byte-code "…Ä ˆebˆÅÆ!ˆÇÈÉ \"ÂÃ#ƒ Ê ˆÃ‚!‡" [set-mark field nil t push-mark mh-goto-header-end 0 re-search-backward format "^%s" end-of-line] 7))
  534. (defun mh-goto-header-end (arg) "\
  535. Find the end of the message header in the current buffer and position
  536. the cursor at the ARG'th newline after the header." (byte-code "ÂÃÀÀ#… Ä !‡" [nil arg re-search-forward "^$\\|^-+$" forward-line] 4))
  537. (define-key mh-folder-mode-map "?" (quote mh-msg-is-in-seq))
  538. (define-key mh-folder-mode-map "%" (quote mh-put-msg-in-seq))
  539. (define-key mh-folder-mode-map "%" (quote mh-delete-msg-from-seq))
  540. (define-key mh-folder-mode-map "n" (quote mh-narrow-to-seq))
  541. (define-key mh-folder-mode-map "w" (quote mh-widen))
  542. (define-key mh-folder-mode-map "b" (quote mh-burst-digest))
  543. (define-key mh-folder-mode-map "u" (quote mh-undo-folder))
  544. (define-key mh-folder-mode-map " " (quote mh-page-digest))
  545. (define-key mh-folder-mode-map "" (quote mh-page-digest-backwards))
  546. (define-key mh-folder-mode-map "e" (quote mh-extract-rejected-mail))
  547. (define-key mh-folder-mode-map "f" (quote mh-visit-folder))
  548. (define-key mh-folder-mode-map "k" (quote mh-kill-folder))
  549. (define-key mh-folder-mode-map "l" (quote mh-list-folders))
  550. (define-key mh-folder-mode-map "p" (quote mh-renumber-folder))
  551. (define-key mh-folder-mode-map "s" (quote mh-search-folder))
  552. (define-key mh-folder-mode-map "r" (quote mh-rescan-folder))
  553. (define-key mh-folder-mode-map "l" (quote mh-print-msg))
  554. (define-key mh-folder-mode-map "t" (quote mh-toggle-summarize))
  555. (define-key mh-folder-mode-map "c" (quote mh-copy-msg))
  556. (define-key mh-folder-mode-map ">" (quote mh-write-msg-to-file))
  557. (define-key mh-folder-mode-map "i" (quote mh-inc-folder))
  558. (define-key mh-folder-mode-map "x" (quote mh-execute-commands))
  559. (define-key mh-folder-mode-map "e" (quote mh-execute-commands))
  560. (define-key mh-folder-mode-map "r" (quote mh-redistribute))
  561. (define-key mh-folder-mode-map "f" (quote mh-forward))
  562. (define-key mh-folder-mode-map "s" (quote mh-send))
  563. (define-key mh-folder-mode-map "a" (quote mh-answer))
  564. (define-key mh-folder-mode-map "g" (quote mh-goto-msg))
  565. (define-key mh-folder-mode-map "" (quote mh-previous-page))
  566. (define-key mh-folder-mode-map " " (quote mh-page-msg))
  567. (define-key mh-folder-mode-map "." (quote mh-show))
  568. (define-key mh-folder-mode-map "u" (quote mh-undo))
  569. (define-key mh-folder-mode-map "!" (quote mh-move-or-write-again))
  570. (define-key mh-folder-mode-map "^" (quote mh-move-msg))
  571. (define-key mh-folder-mode-map "d" (quote mh-delete-msg))
  572. (define-key mh-folder-mode-map "p" (quote mh-previous-line))
  573. (define-key mh-folder-mode-map "n" (quote mh-next-line))
  574. (define-key mh-letter-mode-map "b" (quote mh-to-field))
  575. (define-key mh-letter-mode-map "c" (quote mh-to-field))
  576. (define-key mh-letter-mode-map "f" (quote mh-to-field))
  577. (define-key mh-letter-mode-map "s" (quote mh-to-field))
  578. (define-key mh-letter-mode-map "t" (quote mh-to-field))
  579. (define-key mh-letter-mode-map "" (quote mh-fully-kill-draft))
  580. (define-key mh-letter-mode-map "" (quote mh-check-whom))
  581. (define-key mh-letter-mode-map " " (quote mh-insert-letter))
  582. (define-key mh-letter-mode-map "" (quote mh-insert-cur-msg))
  583. (define-key mh-letter-mode-map "" (quote mh-insert-signature))
  584. (define-key mh-letter-mode-map "" (quote mh-send-letter))
  585. (define-key mh-pick-mode-map "" (quote mh-do-pick-search))
  586. (define-key mh-pick-mode-map "b" (quote mh-to-field))
  587. (define-key mh-pick-mode-map "c" (quote mh-to-field))
  588. (define-key mh-pick-mode-map "f" (quote mh-to-field))
  589. (define-key mh-pick-mode-map "s" (quote mh-to-field))
  590. (define-key mh-pick-mode-map "t" (quote mh-to-field))
  591. (define-key mh-pick-mode-map "" (quote mh-check-whom))