all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Engster <deng@randomsample.de>
To: Tom Tromey <tom@tromey.com>
Cc: 18494@debbugs.gnu.org, Eric Ludlam <eric@siege-engine.com>
Subject: bug#18494: 24.4.50; defclass creates undocumented *-list-p function
Date: Sat, 20 Sep 2014 12:41:25 +0200	[thread overview]
Message-ID: <87bnqavaju.fsf@engster.org> (raw)
In-Reply-To: <87a95xvfuy.fsf@tromey.com> (Tom Tromey's message of "Wed, 17 Sep 2014 20:09:57 -0600")

[add CC Eric]

Tom Tromey writes:
> Try:
>
> (defclass zzz-whatever () ((hi)))
>
> Now notice there is a new function:
>
> (symbol-function 'zzz-whatever-list-p)
> (lambda (obj) "Test OBJ to see if it a list of objects which are a child of type zzz-whatever" (when (listp obj) (let ((ans t)) (while (and obj ans) (setq ans (and (eieio-object-p (car obj)) (object-of-class-p (car obj) zzz-whatever))) (setq obj (cdr obj))) ans)))
>
>
> This new -list-p function is not documented in the EIEIO manual.
>
> It seems to me that it would be a bit better not to define it.
> It doesn't seem generally useful enough, to me.

I agree it's not generally useful. It was added as a helper function to
validate a slot which should hold a list of objects (as part of the
EIEIO/EDE security fix for Emacs 23.4).

At least that's what I remember. I was under the impression that
eieio-persistent-validate/fix-slot-value would use this, but I cannot
see it; maybe it's just hidden very well. If it is not used, I'd agree
that it should better be removed or at least renamed to X--list-p.

Eric, WDYT?

-David





  reply	other threads:[~2014-09-20 10:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18  2:09 bug#18494: 24.4.50; defclass creates undocumented *-list-p function Tom Tromey
2014-09-20 10:41 ` David Engster [this message]
2014-09-20 19:53   ` Eric Ludlam
2014-09-20 23:08     ` Stefan Monnier
2014-09-20 23:34       ` Eric Ludlam
2014-09-21 16:20         ` Stefan Monnier
2014-09-21 16:37           ` Eric Ludlam
2014-10-17  5:11         ` Stefan Monnier
2022-01-30 21:21           ` Lars Ingebrigtsen
2022-01-31  2:34             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-31 15:33               ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=87bnqavaju.fsf@engster.org \
    --to=deng@randomsample.de \
    --cc=18494@debbugs.gnu.org \
    --cc=eric@siege-engine.com \
    --cc=tom@tromey.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.