Subject: Re: bug#67008: 30.0.50; Multiple major mode parents

From: Mattias Engdegård <[email-masked]>
Date: Thu, 16 Nov 2023 20:35:54 +0100

>> Yes, but `merge-ordered-lists` doesn't distinguish between vertical and
>> horizontal edges in any way, does it?
> 
> The text I wrote above says that it does (and I stand by it, and your
> test cases additionally shows that it does), so I don't understand
> the question.

That's because I didn't articulate it very well but reading your elaboration I think we are in non-violent agreement.

> I'm not super happy with my phrasing, but I must say that really your
> above paragraph I don't really know what it means either, so for me it's
> a wash.

Would something like this serve as a start?

The return value is uniquely determined by the following rules:

* The return value is a list containing each input element exactly once.

* The relative order of two elements in the return value is determined by their relative order in the sublists, so that the input ((C D) (A B C)) implies that C precedes D, A precedes B, and B precedes C.

* If two elements are not ordered by the previous rule, they are ordered by the sublists they first occur in. For example, in ((A B) (A C)), B precedes C.

...except that I notice that the first rule is broken if a sublist contains duplicates (which seems wrong), or if the default error function (caar) is used.

I'm not sure I understand if this is correct, or why:

(A) (A) -> (A)
(A A) -> (A A)
(A) (A A) -> error