From 0d887b77b1cb238ac32768a8897b6a79ba19e47a Mon Sep 17 00:00:00 2001 From: Bill Wohler Date: Wed, 28 Dec 2005 21:54:07 +0000 Subject: [PATCH] * simple.el (mh-e-user-agent): Move to mh-e/mh-comp.el and autoload. --- lisp/ChangeLog | 5 +++++ lisp/mh-e/ChangeLog | 5 +++++ lisp/mh-e/mh-comp.el | 16 +++++++++++++--- lisp/simple.el | 4 ---- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6310ee0098..57789ced712 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-12-28 Bill Wohler + + * simple.el (mh-e-user-agent): Move to mh-e/mh-comp.el and + autoload. + 2005-12-28 Stefan Monnier * vc.el (vc-annotate-display): Replace optional arg `color-map' with diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index f10b6779e9c..74fd15a2c19 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,8 @@ +2005-12-28 Bill Wohler + + * mh-comp.el (mh-e-user-agent): Move here from simple.el. Use + mh-user-agent-compose instead of mh-smail-batch. + 2005-12-27 Bill Wohler * mh-utils.el (mh-prompt-for-folder): Use can-create argument to diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 898f24dccb7..113572153af 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -228,18 +228,28 @@ thus is suitable for use by programs that want to create a mail 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. diff --git a/lisp/simple.el b/lisp/simple.el index 8df53b6664c..58e6814b845 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4569,10 +4569,6 @@ See also `read-mail-command' concerning reading mail." (insert body)) t))) -(define-mail-user-agent 'mh-e-user-agent - 'mh-smail-batch 'mh-send-letter 'mh-fully-kill-draft - 'mh-before-send-letter-hook) - (defun compose-mail (&optional to subject other-headers continue switch-function yank-action send-actions) "Start composing a mail message to send. -- 2.39.2