Subject: bug#46374: Regression: erronous calls to PRED switch major-mode of unrelated modified buffers

From: Juri Linkov <[email-masked]>
Date: Tue, 31 Aug 2021 10:02:42 +0300

> I'm way not deep enough into this issue, but how about using a
> temp buffer and checking for major mode equivalent (can pred ever
> reasonably be fundamental-mode?):

This assumes that only derived-mode-p can be used as the predicate,
so it will fix only this particular case until some other code
will find a more clever way to circumvent this assumption
by returning some other arbitrary function that does
more nasty things than changing the major mode.