[Top][All Lists]

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

bug#18494: 24.4.50; defclass creates undocumented *-list-p function

From: Eric Ludlam
Subject: bug#18494: 24.4.50; defclass creates undocumented *-list-p function
Date: Sat, 20 Sep 2014 19:34:03 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091222 Shredder/3.1a1pre

 On 09/20/2014 07:08 PM, Stefan Monnier wrote:
Technically, I could hand write a few of those predicates for the EDE
loader, but I thought it would be generally useful, especially if other folk
want to save their objects.  I'm not sure how widely used it is outside of
EDE, semanticdb, and cogre which all have save files.  I certainly think it
should be documented if consensus is that it stays.  Perhaps an extra option
for the defclass to add extra predicates along
with :method-invocation-order.
My natural reaction is to say that those *-list-p predicates shouldn't
be automatically created, but could someone explain to me in detail
how/where they're used?
E.g. I hear it's used for types, but can't we use a type like (list foo)
instead of foo-list (or maybe (cl-every foo-p) instead of foo-list-p)?

I recall back in the day trying something like (list foo) and not getting it right so I just wrote a predicate. I'm not that familiar with the nuances of typep, but if there is now a typep built into Emacs, EIEIO will need to remove it's local copy of an old typep, and I could certainly convert over to using something list (list foo). I use those predicates mostly with typep.

In that case, the eieio-persistent baseclass will need to be updated to extract desired classes from the predicates correctly. The other occurrences would be easier to swap in new values.


reply via email to

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