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

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 22 Aug 2022 00:21:33 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> I've added a mechanism for obsoletion, and I've now followed Michael's
> recommendation about buffer-local-value not being well-defined as a
> generalized variable, and obsoleted it in Emacs 29.

It turns out that while not well-defined, it's useful here:

(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.  So
I'm not sure it's worth obsoleting the form, and we just have to live
with the somewhat odd semantics.