unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Subject: Re: override defcustom
Date: Sun, 08 Sep 2002 22:24:07 +0200	[thread overview]
Message-ID: <vafr8g444d4.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: 3D7ABCC1.7000109@fit-zones.DELETE-THE-SPAM-BLOCK.com

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	other threads:[~2002-09-08 20:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-08  2:53 override defcustom Bruce Ingalls
2002-09-08 20:24 ` Kai Großjohann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-08-30 14:46 Bruce Ingalls
2002-08-31 16:19 ` Kai Großjohann
2002-09-01  3:27   ` Bruce Ingalls
2002-09-01 18:36     ` Kai Großjohann
2002-09-02 14:32       ` Kai Großjohann
2002-09-03  5:44         ` Bruce Ingalls
2002-09-03 13:04           ` Kai Großjohann

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=vafr8g444d4.fsf@lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    /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).