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

From: Stefan Monnier <[email-masked]>
Date: Mon, 13 Nov 2023 12:46:41 -0500

> Intuitively though, wouldn't we distinguish vertical (class-parent) edges
> from horizontal (parent-parent) ones? Use stiffer springs when building
> the former?

Yes we strictly obey the vertical edges (and call `error-function` when
that's not an option) and we use the horizontal edges when there's
a choice.

E.g. for

    (B A) (C A) (D B) (E D C) -> (E D B C A)
vs
    (E D C) (B A) (C A) (D B) -> (E D C B A)

the vertical edges force the "E D" at the beginning and the "A" at the
end but it's the horizontal edges that make us prefer "B C" in the
first case and "C B" in the other.

This is because after removing the "E D" which are uniquely
determined by the vertical dependencies we're left with:

    (B A) (C A) (B) (C)
vs
    (C) (B A) (C A) (B)

So we continue with "B" in the first case and with "C" in the second.

        Stefan