GNU bug report logs - #26624
26.0.50; Generalized variable `buffer-local-value' does't restore local flag

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Sun, 23 Apr 2017 17:14:02 UTC

Severity: normal

Found in version 26.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #94 received at 26624 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Philipp Stephani <p.stephani2 <at> gmail.com>, 26624 <at> debbugs.gnu.org,
 Noam Postavsky <npostavs <at> users.sourceforge.net>
Subject: Re: bug#26624: 26.0.50; Generalized variable `buffer-local-value'
 does't restore local flag
Date: Mon, 22 Aug 2022 23:43:30 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> 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.




This bug report was last modified 2 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.