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

From: Eric Ludlam <[email-masked]>
Date: Sat, 20 Sep 2014 19:34:03 -0400

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.

Eric