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: Philipp Stephani
Subject: bug#26624: 26.0.50; Generalized variable `buffer-local-value' does't restore local flag
Date: Fri, 29 Dec 2017 16:20:49 +0000



Eli Zaretskii <eliz@gnu.org> schrieb am Fr., 29. Dez. 2017 um 17:15 Uhr:
> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: p.stephani2@gmail.com26624@debbugs.gnu.orgnpostavs@users.sourceforge.net
> Date: Fri, 29 Dec 2017 15:08:41 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Does this warning pop up during bootstrap, and if so, how many times?
>
> It currently would pop up five times:
>
> | ../lisp/electric.el:Warning: Warning: obsolete gv-setter: ‘buffer-local-value’
> | --------------------
> | ../lisp/electric.el:Warning: Warning: obsolete gv-setter: ‘buffer-local-value’
> | --------------------
> | electric.el:350:40:Warning: Warning: obsolete gv-setter: ‘buffer-local-value’
> | --------------------
> | electric.el:580:39:Warning: Warning: obsolete gv-setter: ‘buffer-local-value’
> | --------------------
> | elec-pair.el:608:38:Warning: Warning: obsolete gv-setter: ‘buffer-local-value’
>
>
> Yes, these would need to be treated.

Can we treat them as part of fixing this issue?

Yes, but I think changing them should be a separate commit because it's not straightforward.
These are all modes that can be locally or globally enabled. I think typically such modes would be defined using `define-minor-mode` and `define-globalized-minor-mode`, but the electric modes are defined the other way round, i.e. the main modes are global, and then there are local modes that use `buffer-local-value` as mode variable. I'd suggest to turn this around to use `define-minor-mode` for the local modes and `define-globalized-minor-mode` for the global ones. Would that have any downsides? 

reply via email to

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