unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41814: defmethod cl-print-object is not entirely reliable
@ 2020-06-11 20:05 akater
  2020-06-12 10:26 ` Michael Heerdegen
  0 siblings, 1 reply; 4+ messages in thread
From: akater @ 2020-06-11 20:05 UTC (permalink / raw)
  To: 41814

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

I'm on Emacs 28.0.50.  I believe cl-print-object method code is not used when it
should be.

emacs -Q

C-x b *scratch* RET

(require 'eieio) C-x C-e RET

(defclass test nil nil) C-x C-e RET

(defmethod cl-print-object ((x test) s) (princ "#<test>" s)) C-x C-e RET

(make-feature 'test) RET C-u C-x C-e

For me, this prints like a structure (?): #s(test)

Now,

C-x 3

M-x ielm RET

(make-feature 'test) RET

This does make use of cl-print-object method:

#<test>

Structure method seems to also be used in org-babel evaluations.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-13 11:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 20:05 bug#41814: defmethod cl-print-object is not entirely reliable akater
2020-06-12 10:26 ` Michael Heerdegen
2020-07-06 19:01   ` akater
2021-06-13 11:23   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).