branch: externals/ebdb
commit a84affcaa407d6ec65a15bb37622db298503902c
Author: Eric Abrahamsen <e...@ericabrahamsen.net>
Commit: Eric Abrahamsen <e...@ericabrahamsen.net>

    Replace eieio-object-name-string with ebdb-field-label
    
    * ebdb.el (ebdb-field-label): Now that we're not using `eieio-named',
      we shouldn't be using this method. Replace it with a custom method.
    * ebdb-com.el (ebdb-fmt-field-label, ebdb-copy-fields-as-kill): Change
      calls.
    * ebdb-format.el (ebdb-fmt-field): Change calls.
---
 ebdb-com.el    | 8 ++++----
 ebdb-format.el | 4 ++--
 ebdb.el        | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 8036e0f..d687978 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -532,13 +532,13 @@ This list is also used for toggling layouts."
                                    (field ebdb-field-phone)
                                    (_style (eql oneline))
                                    (_record ebdb-record))
-  (format "phone (%s)" (eieio-object-name-string field)))
+  (format "phone (%s)" (ebdb-field-label field)))
 
 (cl-defmethod ebdb-fmt-field-label ((_fmt ebdb-formatter-ebdb)
                                    (field ebdb-field-address)
                                    (_style (eql oneline))
                                    (_record ebdb-record))
-  (format "address (%s)" (eieio-object-name-string field)))
+  (format "address (%s)" (ebdb-field-label field)))
 
 (cl-defmethod ebdb-fmt-field :around ((_fmt ebdb-formatter-ebdb)
                                      (field ebdb-field)
@@ -2969,8 +2969,8 @@ is a list, copy only the NUMth list element."
        (setq fields
              (seq-filter
               (lambda (f)
-                (string= (eieio-object-name-string f)
-                         (eieio-object-name-string field)))
+                (string= (ebdb-field-label f)
+                         (ebdb-field-label field)))
               fields)))
       (when (and num (> 1 (length fields)))
        (setq fields (list (nth num fields))))
diff --git a/ebdb-format.el b/ebdb-format.el
index d08fc6d..e1e8e21 100644
--- a/ebdb-format.el
+++ b/ebdb-format.el
@@ -207,7 +207,7 @@ FIELD-STRING1 FIELD-STRING2 ..)."
                                    (field ebdb-field-labeled)
                                    _style
                                    (_record ebdb-record))
-  (eieio-object-name-string field))
+  (ebdb-field-label field))
 
 (cl-defmethod ebdb-fmt-field-label ((_fmt ebdb-formatter)
                                    (field ebdb-field-labeled)
@@ -220,7 +220,7 @@ FIELD-STRING1 FIELD-STRING2 ..)."
                              (_style (eql compact))
                              (record ebdb-record))
   (format "(%s) %s"
-         (eieio-object-name-string field)
+         (ebdb-field-label field)
          (ebdb-fmt-field fmt field 'oneline record)))
 
 (cl-defmethod ebdb-fmt-field ((_fmt ebdb-formatter)
diff --git a/ebdb.el b/ebdb.el
index 5b8ade5..dcb6d26 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1033,8 +1033,8 @@ process."
     (ebdb-add-to-list (symbol-value label-var) (slot-value field 'label))
     (cl-call-next-method)))
 
-(cl-defmethod eieio-object-name-string ((field ebdb-field-labeled))
-  "Return a string which is FIELD's name."
+(cl-defmethod ebdb-field-label ((field ebdb-field-labeled))
+  "Return a string label for FIELD."
   (or (slot-value field 'label)
       (ebdb-field-readable-name (eieio-object-class field))))
 

Reply via email to