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

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

Re: override defcustom


From: Kai Großjohann
Subject: Re: override defcustom
Date: Sun, 08 Sep 2002 22:24:07 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Bruce Ingalls <bingalls@fit-zones.DELETE-THE-SPAM-BLOCK.com> writes:

> 2) Put setq()s in a preferences.el file.
>
> This expects that users will ignore the nice Options menu, and
> always be aware to edit this file, instead

I don't understand this.  I had a quick peek at emacro, and it
seems to contain a file init.el which is installed as ~/.emacs.  And
that file does (require 'emacro).  At the end of the file, Customize
might put its thing.

So if you execute (setq font-lock-maximum-decoration t) in emacro.el
or in a file loaded from there, then two things might happen:

(a) The user doesn't change it.  Then your default value takes.

(b) The user changes it via Customize.  Then the custom-set-variables
    statement comes last, so the Customize setting takes.

Isn't this exactly what you want?

Or is there still a misunderstanding involved?

There is only one problem with this: Customize will show the value as
"changed outside customize".  Maybe it would be nicer if it showed
"changed by emacro".  But this might be more a cosmetic problem.

If you tell Customize to change back to the default value, should it
set up the value you put in emacro, or should it set up the value
that comes up in "emacs -q -no-site-file"?

If you want "revert to default" to use your value, then you might be
able to use some low-level function to tel Customize what is the
default value.  (Ah, it seems to be (put
'font-lock-maximum-decoration 'standard-value (list YOUR-VALUE)).)  I
guess the advantage is also that Customize will not show "changed
outside Customize".

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)


reply via email to

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