help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Variable that can be set only through customize


From: Drew Adams
Subject: RE: Variable that can be set only through customize
Date: Thu, 29 Aug 2013 10:04:08 -0700 (PDT)

> While configuring AUCTex, I came upon this variable
> LaTeX-math-abbrev-prefix that can only be set through customize. That's
> what the docstring says, and indeed I can't change its value using
> setq. What's the purpose of this limitationĀ ? Is there a way to
> circumvent itĀ ?

Someone else can speak more directly to your question. (I don't have the
AUCTex code etc.)

But in general it is good to keep in mind that Customize often does
additional things when you use it to set an option value.  One important
thing it does is type-check the value to be assigned; it checks it against
the type specified in the `defcustom' that defines the option.

In addition, a `defcustom' can specify a `:set' operation, which is a
function that is invoked whenever the option gets set to a new value.

To set an option value programmatically, you will want to first check the
option definition - its `defcustom'.  Once you understand that you will be
in a better position to know what you might need to do when setting the
value.

If you intend to set option values using Lisp, you will want to become
familiar with (at least) these Customize functions: `customize-set-value',
`customize-set-variable'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]