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

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

[elpa] externals/ebdb 9169c1e 309/350: When inserting fields, read the f


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 9169c1e 309/350: When inserting fields, read the field but insert a clone
Date: Mon, 14 Aug 2017 11:47:01 -0400 (EDT)

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

    When inserting fields, read the field but insert a clone
    
    Fixes #43
    
    * ebdb-com.el (ebdb-insert-field): Read field, then insert clone. This
      ensures that, when inserting a field into multiple records, each
      record gets its own copy that it can manipulate itself, if it needs
      to.
---
 ebdb-com.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index b29e399..f651368 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1615,10 +1615,12 @@ in `ebdb-db-list', using its default record class.  Use
     (let
        ((field (ebdb-read class
                           (when (equal class 'ebdb-field-user-simple)
-                            `(:object-name ,label)))))
+                            `(:object-name ,label))))
+        clone)
       (ebdb-with-record-edits (r records)
+       (setq clone (clone field))
        (condition-case nil
-         (ebdb-record-insert-field r field)
+         (ebdb-record-insert-field r clone)
          (ebdb-unacceptable-field
           (message "Record %s cannot accept field %s" (ebdb-string r) field)
           (sit-for 2)))))))



reply via email to

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