Merge pull request #907 from Chris00/master

mu4e: Compare email addresses case insensitively
This commit is contained in:
Dirk-Jan C. Binnema 2016-08-28 17:58:13 +03:00 committed by GitHub
commit c29ebc6e6d
2 changed files with 10 additions and 4 deletions

View File

@ -85,9 +85,12 @@ NODEFAULT, hour and minute fields will be nil if not given."
(defun mu4e-user-mail-address-p (addr)
"If ADDR is one of user's e-mail addresses return t, nil otherwise.
User's addresses are set in `mu4e-user-mail-address-list')."
User's addresses are set in `mu4e-user-mail-address-list'. Case
insensitive comparison is used."
(when (and addr mu4e-user-mail-address-list
(find addr mu4e-user-mail-address-list :test 'string=))
(find addr mu4e-user-mail-address-list
:test (lambda (s1 s2)
(eq t (compare-strings s1 nil nil s2 nil nil t)))))
t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@ -155,8 +155,11 @@ the attachment dir. See Info node `(mu4e) Attachments' for details."
(defcustom mu4e-user-mail-address-list `(,user-mail-address)
"List of e-mail addresses to consider 'my email addresses'.
I.e. addresses whose presence in an email imply that it is a
personal message. Note that e-mail addresses are case-sensitive,
as per RFC531."
personal message. Note that the local part (the part before '@')
of e-mail addresses is case-sensitive, as per RFC531. In
practice however, most of the mail systems do not distinguish
addresses based on the case, so the emails in this list will be
matched case-insensitively."
:type '(repeat (string :tag "Address"))
:group 'mu4e)