unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Enhancement suggestion: prin1 extension mechanism
Date: Sat, 13 Sep 2008 13:13:45 +0200	[thread overview]
Message-ID: <m2d4j870ye.fsf@gmail.com> (raw)
In-Reply-To: jwvprn8okw4.fsf-monnier+emacs@gnu.org

* Stefan Monnier [2008-09-13 04:22+0200] writes:

> Of course, you may still want to have an ad-hoc output that hides the
> internal representation, even if the internal representation can be
> printed in an acceptable amount of time.
>
> Maybe we should introduce a notion of "object" (in the OO sense) in
> Emacs's internal representation, so EIEIO (and CL's defstruct) could
> then provide its own printer code.
>
> The simplest way to do that might be to simply introduce a new array
> type called `object', which would work just like array, except that when
> it's printed, it's passed through
> (run-hook-with-args-until-success 'object-print-functions obj), so EIEIO
> and CL could hook into object-print-functions.  Or we could even stuff
> a "class ID" small integer inside the array's size info, so we could
> lookup an object-printer-table.

Instead of changing the internal representation, you could allow entries
for vector and cons etc. in the printer table.  That's how Common Lisp
allows you to customize the printer for built-in types.

Helmut.





  reply	other threads:[~2008-09-13 11:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-11  3:25 Enhancement suggestion: prin1 extension mechanism Eric M. Ludlam
2008-09-13  0:30 ` Richard M. Stallman
2008-09-14 15:47   ` Re[2]: " Eric M. Ludlam
2008-09-15 13:23     ` Richard M. Stallman
2008-09-15 16:31       ` Ted Zlatanov
2008-09-13  2:22 ` Stefan Monnier
2008-09-13 11:13   ` Helmut Eller [this message]
2008-09-13 19:22     ` Stefan Monnier
2008-09-13 21:13       ` Helmut Eller
2008-09-14 19:35         ` Stefan Monnier
2008-09-14 22:09           ` Helmut Eller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2d4j870ye.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).