[Top][All Lists]

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

Re: Towards a cleaner build: eieio

From: Lars Ingebrigtsen
Subject: Re: Towards a cleaner build: eieio
Date: Fri, 14 Jun 2019 14:11:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> (cl-defmethod cl-print-object ((object eieio-default-superclass) stream)
>>   "Default printer for EIEIO objects."
>>   ;; Fallback to the old `object-print'.
>>   (princ (object-print object) stream))
> This is backward compatibility for those packages that define an
> `object-print` method on their own eieio classes (instead of a method
> on cl-print-object).

Yes, but what I wandered was about the call to `object-print'.  It seems
like the definition of object-print here is kinda trivial:

(cl-defmethod object-print ((this eieio-default-superclass) &rest strings)


  (eieio-object-name this (apply #'concat strings)))

So couldn't cl-print-object just say

  (eieio-object-name object)

instead of

  (object-print object)

in the body and avoid the compilation warning?  Or am I misreading the

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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