[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26624: 26.0.50; Generalized variable `buffer-local-value' does't res
From: |
Lars Ingebrigtsen |
Subject: |
bug#26624: 26.0.50; Generalized variable `buffer-local-value' does't restore local flag |
Date: |
Tue, 23 Aug 2022 12:28:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes:
>> :variable (electric-indent-mode .
>> (lambda (val) (setq-local electric-indent-mode val)))
>
> Looks good - similar specs are already used in other places.
Now pushed to Emacs 29 (and I've made buffer-local-value obsolete again
as a generalized variable).
> 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.
Yes, it's not ideal at all.
> Anyway, if this is needed in more places it cries for a
> `define-localized-mode'.
I hope it's not used a lot -- we'd rather have modes work in the
opposite direction. That is, the mode is local, and then we have
globalized versions of it.