branch: externals/ebdb
commit 8eb226215615d186c8a3e4db80f14d812bb26a99
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>

    Add object-print method for records
    
    * ebdb.el (object-print): Slightly wishful thinking that we can
      eventually use this in evaluation printing and backtraces, etc.
---
 ebdb.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ebdb.el b/ebdb.el
index c710d9e..91bed87 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1945,6 +1945,13 @@ only return fields that are suitable for user editing.")
   "Provide a base method that does nothing."
   nil)
 
+(cl-defmethod object-print ((record ebdb-record) &optional strings)
+  (cl-call-next-method
+   record
+   (append strings (format " %s" (if (ebdb-record-cache record)
+                                    (ebdb-record-name record)
+                                  (ebdb-string (slot-value record 'name)))))))
+
 ;; The following functions are here because they need to come after
 ;; `ebdb-record' has been defined.
 

Reply via email to