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

From: Juri Linkov <[email-masked]>
Date: Thu, 06 Jan 2022 21:09:47 +0200

> It's actually easy to distinguish this specific case: when the pred is
> passed directly to `save-some-buffers` we don't need to do the "call
> PRED to get the actual predicate" dance, since the caller could just as
> well do that dance before calling us if that's what they want.
>
> IOW, the test for `save-some-buffers-function` is only needed for those
> functions that come from `save-some-buffers-default-predicate`.
>
> Any objection to the patch below (which also aligns the code closer
> with the doc since the doc of `save-some-buffers` doesn't mention the
> use of the `save-some-buffers-function` property on its `pred`
> argument).

Then this change needs to be in the release branch, so users won't start
relying on the unintended case of using of the `save-some-buffers-function`
property on the `pred` argument.