GNU bug report logs - #18494
24.4.50; defclass creates undocumented *-list-p function

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Thu, 18 Sep 2014 02:11:02 UTC

Severity: minor

Tags: moreinfo

Found in version 24.4.50

Fixed in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 18494 <at> debbugs.gnu.org (full text, mbox):

From: Eric Ludlam <ericludlam <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18494 <at> debbugs.gnu.org, Tom Tromey <tom <at> tromey.com>,
 David Engster <deng <at> randomsample.de>, Eric Ludlam <eric <at> siege-engine.com>
Subject: Re: bug#18494: 24.4.50;
 defclass creates undocumented *-list-p function
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




This bug report was last modified 3 years and 113 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.