Function: mh-letter-mode
mh-letter-mode is an autoloaded, interactive and byte-compiled
function defined in mh-letter.el.gz.
Signature
(mh-letter-mode)
Documentation
Mode for composing letters in MH-E.
When you have finished composing, type C-c C-c (mh-send-letter) to send
the message using the MH mail handling system.
There are two types of tags used by MH-E when composing MIME
messages: MML and MH. The option mh-compose-insertion(var)/mh-compose-insertion(fun) controls
what type of tags are inserted by MH-E commands. These tags can
be converted to MIME body parts by running C-c C-e (mh-mh-to-mime) for
MH-style directives or C-c RET m (mh-mml-to-mime) for MML tags.
Options that control this mode can be changed with
M-x customize-group (customize-group); specify the "mh-compose" group.
When a message is composed, the hooks text-mode-hook,
mail-mode-hook, and mh-letter-mode-hook are run (in that
order).
, mh-letter-confirm-address
<backtab> mh-letter-previous-header-field
C-M-i completion-at-point
C-c ? mh-help
C-c C-\ mh-fully-kill-draft
C-c C-^ mh-insert-signature
C-c C-c mh-send-letter
C-c C-d mh-insert-identity
C-c C-e mh-mh-to-mime
C-c C-f C-a mh-to-field
C-c C-f C-b mh-to-field
C-c C-f C-c mh-to-field
C-c C-f C-d mh-to-field
C-c C-f C-f mh-to-fcc
C-c C-f C-l mh-to-field
C-c C-f C-r mh-to-field
C-c C-f C-s mh-to-field
C-c C-f C-t mh-to-field
C-c C-f RET mh-to-field
C-c C-f a mh-to-field
C-c C-f b mh-to-field
C-c C-f c mh-to-field
C-c C-f d mh-to-field
C-c C-f f mh-to-fcc
C-c C-f l mh-to-field
C-c C-f m mh-to-field
C-c C-f r mh-to-field
C-c C-f s mh-to-field
C-c C-f t mh-to-field
C-c C-o mh-open-line
C-c C-q mh-fully-kill-draft
C-c C-s mh-insert-signature
C-c C-t mh-letter-toggle-header-field-display
C-c C-w mh-check-whom
C-c C-y mh-yank-cur-msg
C-c M-d mh-insert-auto-fields
C-c RET C-e mh-mml-secure-message-encrypt
C-c RET C-f mh-compose-forward
C-c RET C-g mh-mh-compose-anon-ftp
C-c RET C-n mh-mml-unsecure-message
C-c RET C-s mh-mml-secure-message-sign
C-c RET C-t mh-mh-compose-external-compressed-tar
C-c RET C-u mh-mh-to-mime-undo
C-c RET C-x mh-mh-compose-external-type
C-c RET RET mh-mml-to-mime
C-c RET TAB mh-compose-insertion(var)/mh-compose-insertion(fun)
C-c RET e e mh-mml-secure-message-encrypt
C-c RET e s mh-mml-secure-message-signencrypt
C-c RET f mh-compose-forward
C-c RET g mh-mh-compose-anon-ftp
C-c RET i mh-compose-insertion(var)/mh-compose-insertion(fun)
C-c RET m mh-mml-to-mime
C-c RET n mh-mml-unsecure-message
C-c RET s e mh-mml-secure-message-signencrypt
C-c RET s s mh-mml-secure-message-sign
C-c RET t mh-mh-compose-external-compressed-tar
C-c RET u mh-mh-to-mime-undo
C-c RET x mh-mh-compose-external-type
C-c TAB mh-insert-letter
SPC mh-letter-complete-or-space
TAB mh-letter-next-header-field-or-indent
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-letter.el.gz
;;;###mh-autoload
(define-derived-mode mh-letter-mode mail-mode "MH-Letter"
"Mode for composing letters in MH-E\\<mh-letter-mode-map>.
When you have finished composing, type \\[mh-send-letter] to send
the message using the MH mail handling system.
There are two types of tags used by MH-E when composing MIME
messages: MML and MH. The option `mh-compose-insertion' controls
what type of tags are inserted by MH-E commands. These tags can
be converted to MIME body parts by running \\[mh-mh-to-mime] for
MH-style directives or \\[mh-mml-to-mime] for MML tags.
Options that control this mode can be changed with
\\[customize-group]; specify the \"mh-compose\" group.
When a message is composed, the hooks `text-mode-hook',
`mail-mode-hook', and `mh-letter-mode-hook' are run (in that
order).
\\{mh-letter-mode-map}"
(mh-find-path)
(make-local-variable 'mh-send-args)
(make-local-variable 'mh-annotate-char)
(make-local-variable 'mh-annotate-field)
(make-local-variable 'mh-previous-window-config)
(make-local-variable 'mh-sent-from-folder)
(make-local-variable 'mh-sent-from-msg)
(unless mh-letter-tool-bar-map
(mh-tool-bar-letter-buttons-init))
(if (boundp 'tool-bar-map)
(setq-local tool-bar-map mh-letter-tool-bar-map))
;; Set the local value of mh-mail-header-separator according to what is
;; present in the buffer...
(setq-local mh-mail-header-separator
(save-excursion
(goto-char (mh-mail-header-end))
(buffer-substring-no-properties (point) (line-end-position))))
(make-local-variable 'mail-header-separator)
(setq mail-header-separator mh-mail-header-separator) ;override sendmail.el
(mh-set-help mh-letter-mode-help-messages)
(setq buffer-invisibility-spec '((vanish . t) t))
(setq-local line-move-ignore-invisible t)
;; Enable undo since a show-mode buffer might have been reused.
(buffer-enable-undo)
(make-local-variable 'font-lock-defaults)
(cond
((or (equal mh-highlight-citation-style 'font-lock)
(equal mh-highlight-citation-style 'gnus))
;; Let's use font-lock even if gnus is used in show-mode. The reason
;; is that gnus uses static text properties which are not appropriate
;; for a buffer that will be edited. So the choice here is either fontify
;; the citations and header...
(setq font-lock-defaults '(mh-letter-font-lock-keywords t)))
(t
;; ...or the header only
(setq font-lock-defaults '((mh-show-font-lock-keywords) t))))
;; Maybe we want to use the existing Mail menu from mail-mode in
;; 9.0; in the mean time, let's remove it since the redundancy will
;; only produce confusion.
(define-key mh-letter-mode-map [menu-bar mail] #'undefined)
(setq fill-column mh-letter-fill-column)
(add-hook 'completion-at-point-functions
#'mh-letter-completion-at-point nil 'local)
;; If text-mode-hook turned on auto-fill, tune it for messages
(when auto-fill-function
(make-local-variable 'auto-fill-function)
(setq auto-fill-function #'mh-auto-fill-for-letter)))