aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-05 03:44:54 +0000
committerRichard M. Stallman1997-07-05 03:44:54 +0000
commit34fbcdf384c7856350b5ae3cdc9d36920fb1390d (patch)
treee688c611c5e0e4179349c5ab1d7b657a50832eeb
parent5504f993f90e5203f8447d2da34400364522e25d (diff)
downloademacs-34fbcdf384c7856350b5ae3cdc9d36920fb1390d.tar.gz
emacs-34fbcdf384c7856350b5ae3cdc9d36920fb1390d.zip
(sendmail-user-agent-compose): New function;
this has the code that was in sendmail-user-agent. (sendmail-user-agent): Use sendmail-user-agent-compose.
-rw-r--r--lisp/simple.el49
1 files changed, 26 insertions, 23 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index e85d1710953..a60e86b0dd8 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3121,31 +3121,34 @@ The properties used on SYMBOL are `composefunc', `sendfunc',
3121 element)) 3121 element))
3122 3122
3123(define-mail-user-agent 'sendmail-user-agent 3123(define-mail-user-agent 'sendmail-user-agent
3124 '(lambda (&optional to subject other-headers continue 3124 'sendmail-user-agent-compose
3125 switch-function yank-action send-actions)
3126 (if switch-function
3127 (let ((special-display-buffer-names nil)
3128 (special-display-regexps nil)
3129 (same-window-buffer-names nil)
3130 (same-window-regexps nil))
3131 (funcall switch-function "*mail*")))
3132 (let ((cc (cdr (assoc-ignore-case "cc" other-headers)))
3133 (in-reply-to (cdr (assoc-ignore-case "in-reply-to" other-headers))))
3134 (or (mail continue to subject in-reply-to cc yank-action send-actions)
3135 continue
3136 (error "Message aborted"))
3137 (save-excursion
3138 (goto-char (point-min))
3139 (search-forward mail-header-separator)
3140 (beginning-of-line)
3141 (while other-headers
3142 (if (not (member (car (car other-headers)) '("in-reply-to" "cc")))
3143 (insert (car (car other-headers)) ": "
3144 (cdr (car other-headers)) "\n"))
3145 (setq other-headers (cdr other-headers)))
3146 t)))
3147 'mail-send-and-exit) 3125 'mail-send-and-exit)
3148 3126
3127(defun sendmail-user-agent-compose (&optional to subject other-headers continue
3128 switch-function yank-action
3129 send-actions)
3130 (if switch-function
3131 (let ((special-display-buffer-names nil)
3132 (special-display-regexps nil)
3133 (same-window-buffer-names nil)
3134 (same-window-regexps nil))
3135 (funcall switch-function "*mail*")))
3136 (let ((cc (cdr (assoc-ignore-case "cc" other-headers)))
3137 (in-reply-to (cdr (assoc-ignore-case "in-reply-to" other-headers))))
3138 (or (mail continue to subject in-reply-to cc yank-action send-actions)
3139 continue
3140 (error "Message aborted"))
3141 (save-excursion
3142 (goto-char (point-min))
3143 (search-forward mail-header-separator)
3144 (beginning-of-line)
3145 (while other-headers
3146 (if (not (member (car (car other-headers)) '("in-reply-to" "cc")))
3147 (insert (car (car other-headers)) ": "
3148 (cdr (car other-headers)) "\n"))
3149 (setq other-headers (cdr other-headers)))
3150 t)))
3151
3149(define-mail-user-agent 'mh-e-user-agent 3152(define-mail-user-agent 'mh-e-user-agent
3150 'mh-smail-batch 'mh-send-letter 'mh-fully-kill-draft 3153 'mh-smail-batch 'mh-send-letter 'mh-fully-kill-draft
3151 'mh-before-send-letter-hook) 3154 'mh-before-send-letter-hook)