comparison lisp/simple.el @ 18629:fbb38f6bf8dc

(sendmail-user-agent-compose): New function; this has the code that was in sendmail-user-agent. (sendmail-user-agent): Use sendmail-user-agent-compose.
author Richard M. Stallman <rms@gnu.org>
date Sat, 05 Jul 1997 03:44:54 +0000
parents c7a1c26b934f
children 2b3632471f92
comparison
equal deleted inserted replaced
18628:61f38e629f6b 18629:fbb38f6bf8dc
3119 (setq element (car alist))) 3119 (setq element (car alist)))
3120 (setq alist (cdr alist))) 3120 (setq alist (cdr alist)))
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)
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)))
3148 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)
3152 3155