From: okada Date: Sat, 17 Feb 2001 04:04:17 +0000 (+0000) Subject: * wl-draft.el (wl-draft-insert-ccs): New function. X-Git-Tag: wl-2_6-root~115 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=809d33bf9a6726504c5b03769a2d3bc07f447f25;p=elisp%2Fwanderlust.git * wl-draft.el (wl-draft-insert-ccs): New function. (wl-draft): Use `wl-draft-insert-ccs' for Bcc and FCC. * wl-vars.el (wl-draft-delete-myself-from-bcc-fcc): New variable. --- diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index 338c30e..e979db5 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -4234,6 +4234,11 @@ Non-nil $B$J$i<+F0E*$KAw?.$7$^$9(B ($B$$$A$*$&(B @code{y-or-n-p} $B$G3NG'$7 Non-nil $B$J$i!"<+J,08$F$N%a!<%k$KJV?.$9$k>l9g!">o$K(B @samp{To:}, @samp{Cc:} $B$+$i<+J,$N%a!<%k%"%I%l%9$r:o=|$7$^$9!#(B +@item wl-draft-delete-myself-from-bcc-fcc +@vindex wl-draft-delete-myself-from-bcc-fcc +Non-nil $B$G!"(B@samp{To:}, @samp{Cc:} $B$,(B $BJQ?t(B @code{wl-subscribed-mailing-list} $B$K(B +$B4^$^$l$F$$$k>l9g!"(B@samp{Bcc:} , @samp{FCC:} $B$r$D$1$^$;$s!%(B + @item wl-smtp-posting-server @vindex wl-smtp-posting-server $B=i4|@_Dj$O(B @code{nil}$B!#(B diff --git a/doc/wl.texi b/doc/wl.texi index 8597c97..a6d72da 100644 --- a/doc/wl.texi +++ b/doc/wl.texi @@ -4267,6 +4267,11 @@ All headers that match this regexp will be deleted when resending a message. If non-nil, always removes your own address from @samp{To:} and @samp{Cc:} when you are replying to the mail addressed to you. +@item wl-draft-delete-myself-from-bcc-fcc +@vindex wl-draft-delete-myself-from-bcc-fcc +If any of @code{wl-subscribed-mailing-list} are contained in @samp{To:} +or @samp{Cc:} field, do not insert @samp{Bcc:} or @samp{FCC:} field. + @item wl-smtp-posting-server @vindex wl-smtp-posting-server The initial setting is @code{nil}. diff --git a/wl/ChangeLog b/wl/ChangeLog index 97a8528..9f520eb 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2001-02-17 Kenichi OKADA + + * wl-draft.el (wl-draft-insert-ccs): New function. + (wl-draft): Use `wl-draft-insert-ccs' for Bcc and FCC. + * wl-vars.el (wl-draft-delete-myself-from-bcc-fcc): New variable. + 2001-02-15 Yuuichi Teranishi * wl-summary.el (wl-cache-prefetch-message): Fixed last change. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index e82c707..e2204bd 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1338,10 +1338,9 @@ If optional argument is non-nil, current draft buffer is killed" (setq wl-draft-buffer-file-name file-name) (if mail-default-reply-to (insert "Reply-To: " mail-default-reply-to "\n")) - (if (or wl-bcc mail-self-blind) - (insert "Bcc: " (or wl-bcc (user-login-name)) "\n")) - (if wl-fcc - (insert "FCC: " (if (functionp wl-fcc) (funcall wl-fcc) wl-fcc) "\n")) + (wl-draft-insert-ccs "Bcc: " (or wl-bcc + (and mail-self-blind (user-login-name)))) + (wl-draft-insert-ccs "FCC: " wl-fcc) (if wl-organization (insert "Organization: " wl-organization "\n")) (and wl-auto-insert-x-face @@ -1357,7 +1356,7 @@ If optional argument is non-nil, current draft buffer is killed" (when content-type (insert "Content-type: " content-type "\n")) (when content-transfer-encoding - (insert "Content-Transfer-encoding: " content-transfer-encoding "\n")) + (insert "Content-Transfer-Encoding: " content-transfer-encoding "\n")) (if (or content-type content-transfer-encoding) (insert "\n")) (and body (insert body)) @@ -1403,6 +1402,21 @@ If optional argument is non-nil, current draft buffer is killed" wl-summary-buffer-name))) buf-name)) +(defsubst wl-draft-insert-ccs (str cc) + (let ((field + (if (functionp cc) + (funcall cc) + cc))) + (if (and field + (null (and wl-draft-delete-myself-from-bcc-fcc + (elmo-list-member + (mapcar 'wl-address-header-extract-address + (append + (wl-parse-addresses (std11-field-body "To")) + (wl-parse-addresses (std11-field-body "Cc")))) + (mapcar 'downcase wl-subscribed-mailing-list))))) + (insert str field "\n")))) + (defun wl-draft-elmo-nntp-send () (let ((elmo-nntp-post-pre-hook wl-news-send-pre-hook) (elmo-default-nntp-user diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 2a37db4..b62a263 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -607,6 +607,12 @@ Default is for 'followup-to-me'." :type 'boolean :group 'wl-draft) +(defcustom wl-draft-delete-myself-from-bcc-fcc nil + "*Do not insert bcc or fcc if To and Cc fields is a member of +`wl-subscribed-mailing-list'" + :type 'boolean + :group 'wl-draft) + (defcustom wl-draft-resume-folder-window t "*Resume folder window in `wl-draft-hide'." :type 'boolean