Subject: bug#73782: [PATCH] Add `delete-selection-local-mode'.

From: Stefan Monnier <[email-masked]>
Date: Thu, 17 Oct 2024 13:07:27 -0400

> +(define-minor-mode delete-selection-local-mode
> +  "Toggle Delete Selection mode in the current buffer.
> +
> +See the command `delete-selection-mode'.
> +
> +For compatibility with features and packages that are aware of
> +`delete-selection-mode', this mode also sets the
> +variable `delete-selection-mode' in the current buffer."
> +  :global nil :group 'editing-basics

Have you tried to use the `:variable (buffer-local-value
'delete-selection-mode)` instead of introducing a parallel
`delete-selection-local-mode` variable?

        Stefan