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

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

[elpa] externals/ebdb a25e1eb 06/15: Use values from "slots" in role fie


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb a25e1eb 06/15: Use values from "slots" in role field ebdb-read
Date: Sun, 1 Apr 2018 06:02:46 -0400 (EDT)

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

    Use values from "slots" in role field ebdb-read
    
    * ebdb.el (ebdb-read): We should be allowing values in "slots" to
      override the read process.
---
 ebdb.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/ebdb.el b/ebdb.el
index eb0d396..cfb2e9f 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1396,11 +1396,14 @@ first one."
   (cl-call-next-method))
 
 (cl-defmethod ebdb-read ((role (subclass ebdb-field-role)) &optional slots obj)
-  (let ((org-id (if obj (slot-value obj 'org-uuid)
-                 (ebdb-record-uuid (ebdb-prompt-for-record nil 
'ebdb-record-organization))))
-       (mail (ebdb-with-exit
-              (ebdb-read ebdb-default-mail-class nil
-                         (when obj (slot-value obj 'mail))))))
+  (let ((org-id (or (plist-get slots 'org-uuid)
+                   (if obj (slot-value obj 'org-uuid)
+                     (ebdb-record-uuid (ebdb-prompt-for-record
+                                        nil 'ebdb-record-organization)))))
+       (mail (or (plist-get slots 'mail)
+                 (ebdb-with-exit
+                  (ebdb-read ebdb-default-mail-class nil
+                             (when obj (slot-value obj 'mail)))))))
     (when mail
       (setq slots (plist-put slots :mail mail)))
     (setq slots (plist-put slots :org-uuid org-id))



reply via email to

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