Mercurial > emacs
changeset 24421:d072093cd922
(mh-repl-formfile): New var.
(mh-smail-batch): Don't ignore all arguments.
(mh-reply): Do the right thing when using nmh.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 01 Mar 1999 03:47:07 +0000 |
parents | 8532b00fb743 |
children | 1f671d01563a |
files | lisp/mail/mh-comp.el |
diffstat | 1 files changed, 25 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/mh-comp.el Mon Mar 01 03:45:51 1999 +0000 +++ b/lisp/mail/mh-comp.el Mon Mar 01 03:47:07 1999 +0000 @@ -26,7 +26,7 @@ ;;; Change Log: -;; $Id: mh-comp.el,v 1.12 1997/09/19 04:27:56 rms Exp $ +;; $Id: mh-comp.el,v 1.13 1998/06/24 09:16:26 schwab Exp kwzh $ ;;; Code: @@ -147,6 +147,13 @@ is searched for first in the user's MH directory, then in the system MH lib directory.") +(defvar mh-repl-group-formfile "replgroupcomps" + "Name of file to be used as a skeleton for replying to the sender +and all recipients of a messages. Only used if mh-nmh-p is non-nil. +Default is \"replgroupcomps\". If not an absolute file name, the file +is searched for first in the user's MH directory, then in the system +MH lib directory.") + ;;; Hooks: (defcustom mh-letter-mode-hook nil @@ -217,7 +224,7 @@ ;;;###autoload -(defun mh-smail-batch (&rest ignored) +(defun mh-smail-batch (&optional to subject other-headers &rest ignored) "Set up a mail composition draft with the MH mail system. This function is an entry point to mh-e, the Emacs front end to the MH mail system. This function does not prompt the user @@ -226,7 +233,7 @@ Users should use `\\[mh-smail]' to compose mail." (mh-find-path) (let ((mh-error-if-no-draft t)) - (mh-send "" "" ""))) + (mh-send to "" subject))) (defun mh-edit-again (msg) @@ -407,25 +414,32 @@ (interactive (list (mh-get-msg-num t) current-prefix-arg)) (let ((minibuffer-help-form "from => Sender only\nto => Sender and primary recipients\ncc or all => Sender and all recipients")) - (let ((reply-to (or mh-reply-default-reply-to + (let* ((reply-to (or mh-reply-default-reply-to (completing-read "Reply to whom: " '(("from") ("to") ("cc") ("all")) nil t))) - (folder mh-current-folder) - (show-buffer mh-show-buffer) - (config (current-window-configuration))) + (folder mh-current-folder) + (show-buffer mh-show-buffer) + (config (current-window-configuration)) + (group-reply (or (equal reply-to "cc") (equal reply-to "all"))) + (form-file (cond ((and mh-nmh-p group-reply + (stringp mh-repl-group-formfile)) + mh-repl-group-formfile) + ((stringp mh-repl-formfile) mh-repl-formfile) + (t nil)))) (message "Composing a reply...") (mh-exec-cmd "repl" "-build" "-noquery" "-nodraftfolder" - (if (stringp mh-repl-formfile) ;must be string, but we're paranoid - (list "-form" mh-repl-formfile)) + (if form-file + (list "-form" form-file)) mh-current-folder message (cond ((or (equal reply-to "from") (equal reply-to "")) '("-nocc" "all")) ((equal reply-to "to") '("-cc" "to")) - ((or (equal reply-to "cc") (equal reply-to "all")) - '("-cc" "all" "-nocc" "me"))) + (group-reply (if mh-nmh-p + '("-group" "-nocc" "me") + '("-cc" "all" "-nocc" "me")))) (if includep '("-filter" "mhl.reply"))) (let ((draft (mh-read-draft "reply"