Subject: Re: bug#58175: 29.0.50; M-x window-swap-states during an active mark leaves behind a region overlay

From: Eli Zaretskii <[email-masked]>
Date: Tue, 04 Oct 2022 19:54:32 +0300

> Date: Tue, 4 Oct 2022 10:23:49 +0200
> Cc: [email-masked], Stefan Monnier <[email-masked]>
> From: martin rudalics <[email-masked]>
> 
>  > Looks like the internal-region-overlay window parameter, which is
>  > important for correct workings of region-highlight, isn't copied
>  > correctly to the other window as part of swapping state, because its
>  > value ends up as "overlay N in no buffer", i.e. the overlay's buffer
>  > is lost in transition.
> 
> If you want a window parameter to get copied when swapping window states,
> you have to explicitly mark it as "persistent".  For example with:
> 
> (push '(internal-region-overlay . t) window-persistent-parameters)

Thanks.  Does this affect only window-swap-states, or does this affect
anything else?  If the former, I guess the above should be done
globally when Emacs is dumped?