help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to evaluate a function when a defcustom variable is either set o


From: Grant Rettke
Subject: Re: How to evaluate a function when a defcustom variable is either set or saved?
Date: Wed, 15 Jun 2016 12:40:38 -0500

On Tue, Jun 14, 2016 at 11:39 PM, Drew Adams <address@hidden> wrote:
>
>> After the set or save occurs, I would like to evaluate a function.
>> The goal of the function is to calculate some runtime values that
>> need to be re-calculated every time that the variable is changed.
>
> If you mean every time it is changed using the Customize UI or equivalent
> (`custom*' functions), then just use a :set (and possibly an :initialize)
> keyword in your defcustom.
>
> See the Elisp  manual, node `Variable Definitions',
>
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Variable-Definitions.html

Thank you Drew.

Makes sense to look at the creation parameters for the variable
instead of the Easy Customize documentation.



reply via email to

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