mu4e: Improve personal-address handling

Make mu4e-personal-address-p safe for being called with nil.

Upgrade code that used mu4e-user-mail-address-p to
mu4e-personal-address-p.

Update docs.

Add some more helpers to mu4e-message, and avoid some byte-compiler
warnings.
This commit is contained in:
Dirk-Jan C. Binnema
2020-10-19 22:39:25 +03:00
parent 6fc294102b
commit 4985f5c959
5 changed files with 30 additions and 14 deletions

View File

@ -608,7 +608,7 @@ cdr element the To: prefix.")
otherwise ; show the from address; prefixed with the appropriate
`mu4e-headers-from-or-to-prefix'."
(let ((addr (cdr-safe (car-safe (mu4e-message-field msg :from)))))
(if (and addr (mu4e-user-mail-address-p addr))
(if (and addr (mu4e-personal-address-p addr))
(concat (cdr mu4e-headers-from-or-to-prefix)
(mu4e~headers-contact-str (mu4e-message-field msg :to)))
(concat (car mu4e-headers-from-or-to-prefix)