mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
(sendmail-user-agent-compose): New function;
this has the code that was in sendmail-user-agent. (sendmail-user-agent): Use sendmail-user-agent-compose.
This commit is contained in:
parent
5504f993f9
commit
34fbcdf384
@ -3121,31 +3121,34 @@ The properties used on SYMBOL are `composefunc', `sendfunc',
|
||||
element))
|
||||
|
||||
(define-mail-user-agent 'sendmail-user-agent
|
||||
'(lambda (&optional to subject other-headers continue
|
||||
switch-function yank-action send-actions)
|
||||
(if switch-function
|
||||
(let ((special-display-buffer-names nil)
|
||||
(special-display-regexps nil)
|
||||
(same-window-buffer-names nil)
|
||||
(same-window-regexps nil))
|
||||
(funcall switch-function "*mail*")))
|
||||
(let ((cc (cdr (assoc-ignore-case "cc" other-headers)))
|
||||
(in-reply-to (cdr (assoc-ignore-case "in-reply-to" other-headers))))
|
||||
(or (mail continue to subject in-reply-to cc yank-action send-actions)
|
||||
continue
|
||||
(error "Message aborted"))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(search-forward mail-header-separator)
|
||||
(beginning-of-line)
|
||||
(while other-headers
|
||||
(if (not (member (car (car other-headers)) '("in-reply-to" "cc")))
|
||||
(insert (car (car other-headers)) ": "
|
||||
(cdr (car other-headers)) "\n"))
|
||||
(setq other-headers (cdr other-headers)))
|
||||
t)))
|
||||
'sendmail-user-agent-compose
|
||||
'mail-send-and-exit)
|
||||
|
||||
(defun sendmail-user-agent-compose (&optional to subject other-headers continue
|
||||
switch-function yank-action
|
||||
send-actions)
|
||||
(if switch-function
|
||||
(let ((special-display-buffer-names nil)
|
||||
(special-display-regexps nil)
|
||||
(same-window-buffer-names nil)
|
||||
(same-window-regexps nil))
|
||||
(funcall switch-function "*mail*")))
|
||||
(let ((cc (cdr (assoc-ignore-case "cc" other-headers)))
|
||||
(in-reply-to (cdr (assoc-ignore-case "in-reply-to" other-headers))))
|
||||
(or (mail continue to subject in-reply-to cc yank-action send-actions)
|
||||
continue
|
||||
(error "Message aborted"))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(search-forward mail-header-separator)
|
||||
(beginning-of-line)
|
||||
(while other-headers
|
||||
(if (not (member (car (car other-headers)) '("in-reply-to" "cc")))
|
||||
(insert (car (car other-headers)) ": "
|
||||
(cdr (car other-headers)) "\n"))
|
||||
(setq other-headers (cdr other-headers)))
|
||||
t)))
|
||||
|
||||
(define-mail-user-agent 'mh-e-user-agent
|
||||
'mh-smail-batch 'mh-send-letter 'mh-fully-kill-draft
|
||||
'mh-before-send-letter-hook)
|
||||
|
Loading…
Reference in New Issue
Block a user