[Top][All Lists]

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

Setting global variables (was: About zcomplete)

From: Stefan Monnier
Subject: Setting global variables (was: About zcomplete)
Date: Mon, 21 Feb 2022 10:35:43 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I guess this is only of the issue that is so easy to solve on a
> case-by-case basis (e.g. by setting a symbol property) that nobody has
> bothered to write a general solution (e.g. by adding a keyword to
> define-minor-mode that specifies what variables/user options to set when
> enabled).

FWIW, I've been toying with the idea of adding a kind of "advice"
mechanism for variables.

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.


reply via email to

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