From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help 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) Message-ID: <56434747-d240-4ef9-9634-6e2fb264d0bb@default> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1465965608 16579 80.91.229.3 (15 Jun 2016 04:40:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jun 2016 04:40:08 +0000 (UTC) To: Grant Rettke , Emacs Help Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 15 06:39:56 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bD2cN-0002cN-6q for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jun 2016 06:39:55 +0200 Original-Received: from localhost ([::1]:39635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD2cM-0004OH-2s for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jun 2016 00:39:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD2bx-0004NW-7t for help-gnu-emacs@gnu.org; Wed, 15 Jun 2016 00:39:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD2bs-0007Ls-8x for help-gnu-emacs@gnu.org; Wed, 15 Jun 2016 00:39:29 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:33752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD2bs-0007Jg-0A for help-gnu-emacs@gnu.org; Wed, 15 Jun 2016 00:39:24 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u5F4dKSL013833 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Jun 2016 04:39:21 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u5F4dKUu004306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Jun 2016 04:39:20 GMT Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u5F4dI7a026844; Wed, 15 Jun 2016 04:39:19 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110443 Archived-At: > 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-Definitio= ns.html