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

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

[elpa] externals/ebdb 21ed4b7 19/33: Don't hide cl-print-object definiti


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 21ed4b7 19/33: Don't hide cl-print-object definitions
Date: Sun, 3 Sep 2017 17:02:22 -0400 (EDT)

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

    Don't hide cl-print-object definitions
    
    * ebdb.el: There's no need to hide it behind fboundp. If a user's
      Emacs doesn't define it, no harm done: we'll define it, and it just
      won't get used. We could even use it ourselves, this way.
---
 ebdb.el | 57 ++++++++++++++++++++++++++-------------------------------
 1 file changed, 26 insertions(+), 31 deletions(-)

diff --git a/ebdb.el b/ebdb.el
index 882cbbb..7b4a678 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1204,12 +1204,11 @@ simple or complex name class."
          (t
           (ebdb-parse 'ebdb-field-name-simple input slots)))))
 
-(when (fboundp 'cl-print-object)
-  (cl-defmethod cl-print-object ((name ebdb-field-name) stream)
-    (princ (format "#<%S %s>"
-                  (eieio-object-class-name name)
-                  (ebdb-string name))
-          stream)))
+(cl-defmethod cl-print-object ((name ebdb-field-name) stream)
+  (princ (format "#<%S %s>"
+                (eieio-object-class-name name)
+                (ebdb-string name))
+        stream))
 
 (defclass ebdb-field-name-simple (ebdb-field-name)
   ((name
@@ -1593,12 +1592,11 @@ first one."
           (and (eq l-p 'normal)
                (eq r-p 'defunct)))))))
 
-(when (fboundp 'cl-print-object)
-  (cl-defmethod cl-print-object ((mail ebdb-field-mail) stream)
-    (princ (format "#<%S %s>"
-                  (eieio-object-class-name mail)
-                  (slot-value mail 'mail))
-          stream)))
+(cl-defmethod cl-print-object ((mail ebdb-field-mail) stream)
+  (princ (format "#<%S %s>"
+                (eieio-object-class-name mail)
+                (slot-value mail 'mail))
+        stream))
 
 ;;; Address fields
 
@@ -1851,12 +1849,11 @@ first one."
          (plist-put slots :number acc))
     (cl-call-next-method class string slots)))
 
-(when (fboundp 'cl-print-object)
-  (cl-defmethod cl-print-object ((phone ebdb-field-phone) stream)
-    (princ (format "#<%S %s>"
-                  (eieio-object-class-name phone)
-                  (ebdb-string phone))
-          stream)))
+(cl-defmethod cl-print-object ((phone ebdb-field-phone) stream)
+  (princ (format "#<%S %s>"
+                (eieio-object-class-name phone)
+                (ebdb-string phone))
+        stream))
 
 ;;; Notes field
 
@@ -2708,12 +2705,11 @@ only return fields that are suitable for user editing.")
 (cl-defmethod ebdb-record-alt-names ((record ebdb-record))
   (slot-value (ebdb-record-cache record) 'alt-names))
 
-(when (fboundp 'cl-print-object)
-  (cl-defmethod cl-print-object ((record ebdb-record) stream)
-    (princ (format "#<%S %s>"
-                  (eieio-object-class-name record)
-                  (ebdb-string record))
-          stream)))
+(cl-defmethod cl-print-object ((record ebdb-record) stream)
+  (princ (format "#<%S %s>"
+                (eieio-object-class-name record)
+                (ebdb-string record))
+        stream))
 
 (cl-defgeneric ebdb-record-related (record field)
   "Return the record related to RECORD, according to FIELD.
@@ -3887,13 +3883,12 @@ process.")
   :documentation "A `ebdb-db' subclass that saves records
   directly in its persistence file.")
 
-(when (fboundp 'cl-print-object)
-  (cl-defmethod cl-print-object ((db ebdb-db) stream)
-    (princ (format "#<%S %s %d records>"
-                  (eieio-object-class-name db)
-                  (slot-value db 'file)
-                  (length (slot-value db 'records)))
-          stream)))
+(cl-defmethod cl-print-object ((db ebdb-db) stream)
+  (princ (format "#<%S %s %d records>"
+                (eieio-object-class-name db)
+                (slot-value db 'file)
+                (length (slot-value db 'records)))
+        stream))
 
 ;; `ebdb-db-file' doesn't need a `ebdb-db-load' method.  Its records
 ;; are stored in its persistence file, directly in the :records slot,



reply via email to

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