grunwald@flute.cs.uiuc.edu (Dirk Grunwald) (07/26/89)
In mail-util.el, there is a function ``rmail-dont-reply-to''
+ I think that this should be more properly called
``mail-dont-reply-to'' since it useful for more than rmail.
+ the `mail' function should call this directly in mail-setup,
as shown below. This would make all mailers act in a similar
fashion. I actually think that putting in a call to
mail-strip-quoted-names wouldn't be a bad idea either.
comments?
(defun mail-setup (to subject in-reply-to cc replybuffer)
(if (eq mail-aliases t)
(progn
(setq mail-aliases nil)
(if (file-exists-p "~/.mailrc")
(build-mail-aliases))))
(setq mail-reply-buffer replybuffer)
(goto-char (point-min))
(insert "To: ")
;;
;; insert functionality so all mailers act consistently
;;
(if to (setq to (rmail-dont-reply-to to)))
(if cc (setq cc (rmail-dont-reply-to cc)))
(if (not (and cc (string-match "[a-zA-Z0-9]" cc)))
(setq cc nil))
;;
;; end of insertion
;;
(save-excursion
(if to
(progn
(insert to "\n")
;;; Here removed code to extract names from within <...>
;;; on the assumption that mail-strip-quoted-names
;;; has been called and has done so.
(let ((fill-prefix "\t"))
(fill-region (point-min) (point-max))))
(newline))
(if cc
(let ((opos (point))
(fill-prefix "\t"))
(insert "CC: " cc "\n")
(fill-region-as-paragraph opos (point-max))))
(if in-reply-to
(insert "In-reply-to: " in-reply-to "\n"))
(insert "Subject: " (or subject "") "\n")
(if mail-default-reply-to
(insert "Reply-to: " mail-default-reply-to "\n"))
(if mail-self-blind
(insert "BCC: " (user-login-name) "\n"))
(if mail-archive-file-name
(insert "FCC: " mail-archive-file-name "\n"))
(insert mail-header-separator "\n"))
(if to (goto-char (point-max)))
(or to subject in-reply-to
(set-buffer-modified-p nil))
(run-hooks 'mail-setup-hook))
--
Dirk Grunwald -- Univ. of Illinois (grunwald@flute.cs.uiuc.edu)