emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 17 Jun 2019 00:44:03 +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 ((obj semanticdb-table-emacs-lisp) stream)
>> +  "Pretty printer extension for `semanticdb-table-emacs-lisp'."
>> +  (princ (eieio-object-name obj " (proxy)") stream))
>
> Hmm... how does this code result in
>
>     #<semanticdb-table-emacs-lisp semanticdb-table-emacs-lisp-15884632da6c 
> (proxy)>

(eieio-object-name obj)
=> "#<semanticdb-table-emacs-lisp semanticdb-table-emacs-lisp-15884632da6c>"

and it just appends whatever string you give to it after the object...

> This said, I'm not sure why we should care very much about preserving
> the detailed output in this particular case, since I don't think the
> rest of code will ever do much with it (it's only for human consumption
> and it's not particularly good at it).

No, we probably don't care much in this particular instance, but it was
a really simple one to use as a test case.

If you otherwise think it looks like a sensible transform, I can start
doing the other ones (and some of them have better printed
representations, if I recall correctly from skimming them).

-- 
(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]