From: Drew Adams <drew.adams@oracle.com>
To: Grant Rettke <gcr@wisdomandwonder.com>,
Emacs Help <help-gnu-emacs@gnu.org>
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) [thread overview]
Message-ID: <56434747-d240-4ef9-9634-6e2fb264d0bb@default> (raw)
In-Reply-To: <CAAjq1mfHhjLiyACqXbRGOkBAkU0cTqCMYA_Ti6b_D77nbQ=ySA@mail.gmail.com>
> 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
next prev parent reply other threads:[~2016-06-15 4:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 1:13 How to evaluate a function when a defcustom variable is either set or saved? Grant Rettke
2016-06-15 4:39 ` Drew Adams [this message]
2016-06-15 17:40 ` Grant Rettke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56434747-d240-4ef9-9634-6e2fb264d0bb@default \
--to=drew.adams@oracle.com \
--cc=gcr@wisdomandwonder.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.