Subject: Re: bug#26624: 26.0.50; Generalized variable `buffer-local-value' does't restore local flag

From: Michael Heerdegen <[email-masked]>
Date: Mon, 22 Aug 2022 23:43:30 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> Let's see...  would this work?
>
> :variable (electric-indent-mode .
>            (lambda (val) (setq-local electric-indent-mode val)))

Looks good - similar specs are already used in other places.

BTW: I find the definition of `electric-indent-local-mode' inelegant:
the handling of the variable is split between the :variable spec and the
body.  The body enables the global mode and sets the global variable
back to nil - quite hackish.

Anyway, if this is needed in more places it cries for a
`define-localized-mode'.

Michael.