branch: externals/ebdb
commit b26e29541fa8d86513f3a979fa228251eb581575
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
Fall back to human readable name of labeled fields
* ebdb.el (eieio-object-name-string): Override this method, which
originally would have printed the symbol name of the field class if
the instance had no label. Instead, print the human readable name of
the field class.
---
ebdb.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ebdb.el b/ebdb.el
index 78eb629..b48422e 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -746,6 +746,11 @@ process."
(ebdb-add-to-list label-var (slot-value field 'object-name))
(cl-call-next-method)))
+(cl-defmethod eieio-object-name-string ((field ebdb-field-labeled))
+ "Return a string which is FIELD's name."
+ (or (slot-value field 'object-name)
+ (ebdb-field-readable-name (class-of field))))
+
;;; The obfuscated field type. This is a little goofy, but might come
;;; in handy.