emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb 6576148 4/5: Fix post-delete mail manipulation


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 6576148 4/5: Fix post-delete mail manipulation
Date: Tue, 24 Apr 2018 16:26:59 -0400 (EDT)

branch: externals/ebdb
commit 6576148ef3006a2b0ee6ea57faf2fa41d58bd3d8
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]