emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting global variables


From: Stefan Monnier
Subject: Re: Setting global variables
Date: Tue, 22 Feb 2022 08:04:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>   > Basically associate with every variable a base value and a list of
>   > functions that modify it.  Then minor modes can add a function to the
>   > list (which would implicitly update the var's effective value) when
>   > enabled and then remove it afterwards.
> I'm not sure what that last sentence means.  Are you proposing a
> low-level mechanism that would take specified actions whenever the
> variable gets set?

No, because at that level we lack the needed information (basically,
the *intention* behind the new value).

> Or a Lisp-level facility that would achieve similar results?

Yes, that.
The idea is very much like advice-add/remove but for variables instead
of functions.


        Stefan




reply via email to

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