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

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

[elpa] externals/ebdb b26e295 325/350: Fall back to human readable name


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb b26e295 325/350: Fall back to human readable name of labeled fields
Date: Mon, 14 Aug 2017 11:47:04 -0400 (EDT)

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

    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.
 



reply via email to

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