From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?
Date: Mon, 30 Nov 2015 16:44:59 +0100 [thread overview]
Message-ID: <m27fkzze2s.fsf@polytechnique.org> (raw)
In-Reply-To: <99f3716d-513e-42b5-b43b-fafca9c81f5a@default> (Drew Adams's message of "Mon, 30 Nov 2015 07:20:27 -0800 (PST)")
[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]
On 2015-11-30 16:20, Drew Adams <drew.adams@oracle.com> writes:
> Here is one example of a :set function (from character-fold+.el)
> that does something more than just change the value:
>
> (defcustom char-fold-symmetric nil
> "Non-nil means char-fold searching treats equivalent chars the same.
> That is, use of any of a set of char-fold equivalent chars in a search
> string finds any of them in the text being searched.
>
> If nil then only the \"base\" or \"canonical\" char of the set matches
> any of them. The others match only themselves, even when char-folding
> is turned on."
> :set (lambda (sym defs)
> (custom-set-default sym defs)
> (update-char-fold-table))
> :type 'boolean :group 'isearch)
>
> Standard function `custom-set-default' is the usual way to change
> the variable's (default) value, so this :set function firt calls
> that. Then it calls a function that changes some other state,
> taking the new variable value into account.
Ah, very interesting. Thanks for the explanation.
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated November 29, 2015, Mauna Loa Obs.): 400.37 ppm
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
next prev parent reply other threads:[~2015-11-30 15:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-29 18:47 which one to use: custom-set-variables, customize-set-variable, or customize-set-value? Alan Schmitt
2015-11-29 19:19 ` Drew Adams
2015-11-30 8:52 ` Alan Schmitt
2015-11-30 15:20 ` Drew Adams
2015-11-30 15:44 ` Alan Schmitt [this message]
2015-12-11 18:23 ` Lele Gaifax
2015-12-11 18:53 ` Drew Adams
2015-12-12 8:31 ` Lele Gaifax
2015-12-12 12:09 ` tomas
2015-12-12 13:31 ` Lele Gaifax
2015-12-12 16:11 ` Drew Adams
2015-12-13 8:17 ` tomas
2015-12-13 17:32 ` Drew Adams
2015-12-14 2:44 ` B.V. Raghav
2015-12-14 8:28 ` Lele Gaifax
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m27fkzze2s.fsf@polytechnique.org \
--to=alan.schmitt@polytechnique.org \
--cc=drew.adams@oracle.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).