From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Grant Rettke Newsgroups: gmane.emacs.help 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 Message-ID: References: <56434747-d240-4ef9-9634-6e2fb264d0bb@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1466012472 4108 80.91.229.3 (15 Jun 2016 17:41:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jun 2016 17:41:12 +0000 (UTC) Cc: Emacs Help To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 15 19:41:07 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 1bDEoN-0000JM-7J for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jun 2016 19:41:07 +0200 Original-Received: from localhost ([::1]:44077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDEoM-0000ZD-BN for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jun 2016 13:41:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDEnw-0000Z7-Ru for help-gnu-emacs@gnu.org; Wed, 15 Jun 2016 13:40:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDEnv-0003ck-Rd for help-gnu-emacs@gnu.org; Wed, 15 Jun 2016 13:40:40 -0400 Original-Received: from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d]:35583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDEnv-0003cf-Dr for help-gnu-emacs@gnu.org; Wed, 15 Jun 2016 13:40:39 -0400 Original-Received: by mail-io0-x22d.google.com with SMTP id f30so19417249ioj.2 for ; Wed, 15 Jun 2016 10:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=O8PyZR568gDmH/tDrcP6VYJcSTbrutW+SAEXQyunVR4=; b=gq6zW1ErfktY0x7+5O4j4vZmCTsjDVwj6uHTtJ8qvFiXJqFyDkDmhnMVQ+KOpEbJ8F w0yQCff73c2XoKipqa+7v9/h+mPFMN4DTsDKnOdcEJGDAWxN0Oaq3nwOL5xVRF5sXhTG oP0LQNpVAXkYSwqtpVNn6SfQgD57QPxADyYhKh7oOn85xFvOSPOOet3mZqTSKXcEfoFg JfDSWTQh6frTS8f7p/jzYUgvvbsAAr2wmmiX1aivcmxD3YWbvCDAB9XQiIROihVMHFQY n7+TXD0dBtBFY8PQpH2VQnY+2lgCIXTq+50q4MW7rt/v96Llh5QsB0WiC46vi6qaKrY1 7JcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=O8PyZR568gDmH/tDrcP6VYJcSTbrutW+SAEXQyunVR4=; b=OZDPndebeFyyrMImNv1CJj8FttHrwZwf91XN6qRqC5e/RzXNaqT89uUIfsp1ogCilt eK4NJgpYsI8mgeoMTaoyDS8/Why/PYfb0TPunPce6Gq7cpR8b/9B+3iGO69/evQa+ccj yYVlPNNATNR9XEEwlD7t8VkYTwUzHwIPg2CMVvOGlh62q+HJzwSs6fFfBBtdZ/Er1lNs BiJlcT7PSLnBNv7dbYW4kQM1EPE7O5WK9/pHORwPXjOwiUQL71fdRocAqHqyNvUo5bxa 9K10S090myQdW0On4gEnP7YUVz/6FC7ScvWGk12yRRDTuuEEeQNnEdKjsyhDQjc5fBxh DhCw== X-Gm-Message-State: ALyK8tIwGX1VHp6NFQ3GN7u3Pq4Hh/9d0eCm9UNOb/YIKVQOEHoYIgEZIxsSeLoxQFdaHJhIP4RU+QHbuLLH/g== X-Received: by 10.107.59.78 with SMTP id i75mr954682ioa.125.1466012438927; Wed, 15 Jun 2016 10:40:38 -0700 (PDT) Original-Received: by 10.79.84.199 with HTTP; Wed, 15 Jun 2016 10:40:38 -0700 (PDT) In-Reply-To: <56434747-d240-4ef9-9634-6e2fb264d0bb@default> X-Google-Sender-Auth: PK8pWe9nmIkv1ExuqES3ZFa4l2s X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c06::22d 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:110448 Archived-At: On Tue, Jun 14, 2016 at 11:39 PM, Drew Adams 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.