From 46a49c8875119b67765e4119745010319cd7fac3 Mon Sep 17 00:00:00 2001 From: djcb Date: Sun, 9 Dec 2012 15:31:39 +0200 Subject: [PATCH] * remove all addresses in `mu4e-user-mail-address-list' from cc-list; fixes #101 --- mu4e/mu4e-draft.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mu4e/mu4e-draft.el b/mu4e/mu4e-draft.el index b4567200..37f46d07 100644 --- a/mu4e/mu4e-draft.el +++ b/mu4e/mu4e-draft.el @@ -113,7 +113,7 @@ that, otherwise use the From address. Note, whatever was in the To: field before, goes to the Cc:-list (if we're doing a reply-to-all)." (let ((reply-to (or (plist-get origmsg :reply-to) (plist-get origmsg :from)))) - (delete-duplicates reply-to :test #'mu4e~draft-address-cell-equal))) + (delete-duplicates reply-to :test #'mu4e~draft-address-cell-equal))) (defun mu4e~draft-create-cc-lst (origmsg reply-all) @@ -143,8 +143,10 @@ the original message ORIGMSG, and whether it's a reply-all." cc-lst (delete-if (lambda (cc-cell) - (mu4e~draft-address-cell-equal cc-cell - (cons nil user-mail-address))) + (member-if + (lambda (addr) + (string= (downcase addr) (downcase (cdr cc-cell)))) + mu4e-user-mail-address-list)) cc-lst)))) cc-lst)))