[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: |
Drew Adams |
Subject: |
RE: How to evaluate a function when a defcustom variable is either set or saved? |
Date: |
Tue, 14 Jun 2016 21:39:17 -0700 (PDT) |
> 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