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 #97 received at 26624 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
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: Tue, 23 Aug 2022 12:28:47 +0200
Michael Heerdegen <michael_heerdegen <at> 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.




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.