diff lisp/mh-e/mh-comp.el @ 67886:b98e23ab1402

* simple.el (mh-e-user-agent): Move to mh-e/mh-comp.el and autoload.
author Bill Wohler <wohler@newt.com>
date Wed, 28 Dec 2005 21:52:33 +0000
parents 9c3504ae6060
children 7882fc7df359
line wrap: on
line diff
--- a/lisp/mh-e/mh-comp.el	Wed Dec 28 20:13:47 2005 +0000
+++ b/lisp/mh-e/mh-comp.el	Wed Dec 28 21:52:33 2005 +0000
@@ -228,18 +228,28 @@
 buffer. Users should use \\[mh-smail] to compose mail.
 
 Optional arguments for setting certain fields include TO,
-SUBJECT, and OTHER-HEADERS. Additional arguments are IGNORED."
+SUBJECT, and OTHER-HEADERS. Additional arguments are IGNORED.
+
+This function remains for Emacs 21 compatibility. New
+applications should use `mh-user-agent-compose'."
   (mh-find-path)
   (let ((mh-error-if-no-draft t))
     (mh-send (or to "") "" (or subject ""))))
 
-;; XEmacs needs this:
+;;;###autoload
+(define-mail-user-agent 'mh-e-user-agent
+  'mh-user-agent-compose 'mh-send-letter 'mh-fully-kill-draft
+  'mh-before-send-letter-hook)
+
 ;;;###autoload
 (defun mh-user-agent-compose (&optional to subject other-headers continue
                                         switch-function yank-action
                                         send-actions)
   "Set up mail composition draft with the MH mail system.
-This is `mail-user-agent' entry point to MH-E.
+This is the `mail-user-agent' entry point to MH-E. This function
+conforms to the contract specified by `define-mail-user-agent'
+which means that this function should accept the same arguments
+as `compose-mail'.
 
 The optional arguments TO and SUBJECT specify recipients and the
 initial Subject field, respectively.