bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Mon, 22 Aug 2022 12:10:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

>> (define-minor-mode electric-indent-local-mode
>>   "Toggle `electric-indent-mode' only in this buffer."
>>   :variable (buffer-local-value 'electric-indent-mode (current-buffer))
>>
>> Rewriting this to avoid this is slightly cumbersome, it turns out.
>
> Why not use the (GET . SET) syntax for :variable?

Let's see...  would this work?

:variable (electric-indent-mode .
           (lambda (val) (setq-local electric-indent-mode val)))
           





reply via email to

[Prev in Thread] Current Thread [Next in Thread]