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

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

[elpa] externals/ebdb c0e7c2d 5/8: Neglected to add a ebdb-read method f


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb c0e7c2d 5/8: Neglected to add a ebdb-read method for ebdb-field-tags
Date: Mon, 6 Jan 2020 14:39:42 -0500 (EST)

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

    Neglected to add a ebdb-read method for ebdb-field-tags
    
    * ebdb.el (ebdb-field-tags): Forgot to write this.
---
 ebdb.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ebdb.el b/ebdb.el
index 9ee75af..a2b09d6 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2349,6 +2349,15 @@ See `ebdb-url-valid-schemes' for a list of acceptable 
schemes."
 (cl-defmethod ebdb-string ((field ebdb-field-tags))
   (ebdb-concat 'ebdb-field-tags (slot-value field 'tags)))
 
+(cl-defmethod ebdb-read ((field (subclass ebdb-field-tags)) &optional slots 
obj)
+  (let* ((crm-separator (cadr (assq 'ebdb-field-tags ebdb-separator-alist)))
+        (val (completing-read-multiple
+              (format "Tags (separate with \"%s\"): " crm-separator)
+              ebdb-tags
+              nil nil
+              (when obj (ebdb-string obj)))))
+    (cl-call-next-method field (plist-put slots :tags val))))
+
 (cl-defmethod ebdb-search-read ((_class (subclass ebdb-field-tags)))
   (let ((search-string (ebdb-read-string
                        "Search for tags (eg +tag1-tag2|tag3): ")))



reply via email to

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