Subject: Re: bug#78989: 31.0.50; classes and methods inheritance (defclass) seq-contains-p

From: "Pierre L. Nageoire" <[email-masked]>
Date: Wed, 16 Jul 2025 04:56:25 +0200

Hi Stefan,

OK I do not get any error now. I have start to siimplify my code. I
still got many inconsistent heirarchy warnings. I wil try to make them
disappear as much as possible.

Thanks for your help !

Bests 
"Pierre L. Nageoire" <[email-masked]> writes:

> Hi Stefan,
> Stefan Monnier <[email-masked]> writes:
>
>>> - First if I read carefully none of you told me why my code works with
>>> the previous version but not with the current.
>>
>> Yeah, sorry for that.  The reason is quite simple: the code was
>> significantly massaged/rewritten so as to make it more generic, mostly
>> for the purpose of sharing that code with that dealing with the
>> hierarchy of major modes.
>
>
>   OK the reason is clear for me; one wishes that the schedule is the
>   same when dealing with inheritance.
>
>>
>>> Anyway that is not the question; and I will wait until you will have
>>> stabilized something to clean my own code.  Stefan you suggest me to
>>> modify the order of classes in parentship.  But the order was chosen to
>>> provide certain methods for child classes.
>>
>> The changes I suggested fix inconsistencies between classes, e.g. you
>> have a class with parents
>>
>>     (widobj title)
>>
>> but `widobj` is a parent of `title` so methods for `widobj` cannot take
>> precedence of methods for `title`.
>
>   OK clear for me.
>
>>
>>> In the code I sent you have not the whole features.
>>
>> Now you tell me!  🙂
>>
>>> Please tell me when you will be almost sure that you have put the emacs
>>> code in a rather stable sate so that I can make my own code fit emacs
>>> code requiremens.
>>
>> I just pushed the code to `master`.
>> It the same as the last patch I sent.
>> It passes your test without changes to your code but complains
>> along the way about problems your code needs to fix.
>> Let us know how it affects your real code.
>
>
>   OK I will make the tests and tell you. But anyway I will also keep in
>   mind that it would be much better if I simplify my code !
>
>>
>>> Once more I know that this part of Emacs code is also work in progress
>>> and that such problems may still occur.
>>
>> Well, not really, it's more a "dark corner" that has not been
>> heavily exercised.
>
>
>   And my code was so complicated that it is a sort of torture test !
>>
>> It would be good to improve the patch I installed by adding
>> a compile-time warning since it's a better moment to fix the problem
>> than when running the code.
>
>
>   Bests
>
> Pierre 
>>
>>
>>         Stefan