Function: rmail-start-mail
rmail-start-mail is a byte-compiled function defined in rmail.el.gz.
Signature
(rmail-start-mail &optional NOERASE TO SUBJECT IN-REPLY-TO CC REPLYBUFFER SENDACTIONS SAME-WINDOW OTHER-HEADERS)
Source Code
;; Defined in /usr/src/emacs/lisp/mail/rmail.el.gz
(defun rmail-start-mail (&optional noerase to subject in-reply-to cc
replybuffer sendactions same-window
other-headers)
(let ((switch-function
(cond (same-window nil)
(rmail-mail-new-frame 'switch-to-buffer-other-frame)
(t 'switch-to-buffer-other-window)))
yank-action)
(if replybuffer
;; The function used here must behave like insert-buffer wrt
;; point and mark (see doc of sc-cite-original).
(setq yank-action
`(rmail-yank-current-message ,replybuffer)))
(push (cons "cc" cc) other-headers)
(push (cons "in-reply-to" in-reply-to) other-headers)
(setq other-headers
(mapcar (lambda (elt)
(cons (car elt) (if (stringp (cdr elt))
(rfc2047-decode-string (cdr elt)))))
other-headers))
(if (stringp to) (setq to (rfc2047-decode-string to)))
(if (stringp in-reply-to)
(setq in-reply-to (rfc2047-decode-string in-reply-to)))
(if (stringp cc) (setq cc (rfc2047-decode-string cc)))
(if (stringp subject) (setq subject (rfc2047-decode-string subject)))
(prog1
(compose-mail to subject other-headers noerase
switch-function yank-action sendactions
(if replybuffer `(rmail-mail-return ,replybuffer)))
(if (eq switch-function 'switch-to-buffer-other-frame)
;; This is not a standard frame parameter; nothing except
;; sendmail.el looks at it.
(modify-frame-parameters (selected-frame)
'((mail-dedicated-frame . t)))))))