branch: externals/ebdb commit 6576148ef3006a2b0ee6ea57faf2fa41d58bd3d8 Author: Eric Abrahamsen <e...@ericabrahamsen.net> Commit: Eric Abrahamsen <e...@ericabrahamsen.net>
Fix post-delete mail manipulation * ebdb.el (ebdb-record-delete-field): This needed to check if there actually *is* a mail field to act on, and also wasn't actually setting the priority properly. --- ebdb.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ebdb.el b/ebdb.el index 0fcff72..03f9a37 100644 --- a/ebdb.el +++ b/ebdb.el @@ -3036,9 +3036,10 @@ If there aren't any other primary mails, make the first of the remaining mails primary." (let* ((mails (remove mail (ebdb-record-mail record))) (clone (unless (object-assoc 'primary 'priority mails) - (clone (car mails))))) + (when (car mails) + (clone (car mails) :priority 'primary))))) (when clone - (ebdb-record-change-field record (car mails) clone)))) + (ebdb-record-change-field record (car mails) clone)))) (defun ebdb-compose-mail (&rest args) "Start composing a mail message to send.