Subject: bug#54438: 27.2; inconsistent-behavior-global-vs-local-hook

From: Stefan Monnier <[email-masked]>
Date: Fri, 18 Mar 2022 08:14:49 -0400

>> Also, I would expect that a hook just calls the hook function, and it would
>> not 'restore the window
>>   selected before the hook'. I would say the restoring is undesired behavior.
>
> The idea is probably that a function on that hook should be allowed to
> inadvertently select some other window and have the hook runner fix
> that.  Maybe Stefan can tell us more.

No, IIRC it is just a consequence of needing to select windows when
running the local part of the hook (since that part is supposed to be
run for every window (which was modified) displaying that buffer).

        Stefan