mirror of https://github.com/djcb/mu.git
mu4e: allow mu4e-compose-complete-ignore-address-regexp nil
Though it shouldn't, some users have mu4e-compose-complete-ignore-address-regexp at nil, which gives errors with the new contacts code. Be a bit more tolerant.
This commit is contained in:
parent
bdaa9c1aec
commit
76dd849d06
|
@ -650,13 +650,14 @@ or (rfc822-string . CONTACT) otherwise."
|
|||
(setq contact (funcall mu4e-contact-rewrite-function contact)))
|
||||
(when contact
|
||||
(let ((name (plist-get contact :name))
|
||||
(mail (plist-get contact :mail)))
|
||||
(unless (and mail
|
||||
(string-match mu4e-compose-complete-ignore-address-regexp mail))
|
||||
(mail (plist-get contact :mail))
|
||||
(ignore-rx (or mu4e-compose-complete-ignore-address-regexp "")))
|
||||
(unless (and mail (not (string-match ignore-rx mail)))
|
||||
(cons
|
||||
(if name (format "%s <%s>" (mu4e~rfc822-quoteit name) mail) mail)
|
||||
contact)))))
|
||||
|
||||
|
||||
(defun mu4e~sort-contacts (contacts)
|
||||
"Destructively sort contacts (only for cycling) in order of
|
||||
'mostly likely contact'.t See the code for the detail"
|
||||
|
|
Loading…
Reference in New Issue