From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: defcustom: changing from defvar - order of execution
Date: Wed, 04 May 2005 11:03:26 -0400 [thread overview]
Message-ID: <877jifnilm.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.3227.1115174847.2819.help-gnu-emacs@gnu.org
> Second setup - library foo.el has this:
> (defcustom foovar nil)
> (defun foo-fn () foovar)
> Second setup - user has this in .emacs, after customizing
> foovar to `t' with Customize:
> (load-library "foo")
> (foo-fn)
> ...
> (custom-set-variables '(foovar t)...)
> When .emacs is loaded, (foo-fn) is executed, foovar is (has
> default value) `nil', so (foo-fn) returns `nil'.
You're comparing two different elisp package code and two different .emacs
code. Try to separate those two cases; it will help you understand
the problem.
E.g. changing the elisp package to use defcustom, but without the user
changing her .emacs will not result in any problem.
The problem comes when the user replaces her "setq at the beginning" with
a "custom-set-var at the end".
It's only weakly related to the use of custom since the same behavior
appears if you move the setq, or if you move the custom-set-var.
Stefan
next prev parent reply other threads:[~2005-05-04 15:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-03 15:50 defcustom: changing from defvar - order of execution Drew Adams
2005-05-03 16:13 ` Drew Adams
[not found] ` <mailman.3227.1115174847.2819.help-gnu-emacs@gnu.org>
2005-05-04 15:03 ` Stefan Monnier [this message]
2005-05-04 22:49 ` Drew Adams
2005-05-04 15:51 ` rgb
2005-05-04 22:49 ` Drew Adams
[not found] <mailman.3356.1115247555.2819.help-gnu-emacs@gnu.org>
2005-05-06 3:20 ` Stefan Monnier
2005-05-06 17:00 ` Drew Adams
[not found] <mailman.3782.1115404280.2819.help-gnu-emacs@gnu.org>
2005-05-07 15:56 ` Stefan Monnier
[not found] <mailman.3763.1115399076.2819.help-gnu-emacs@gnu.org>
2005-05-06 17:38 ` Stefan Monnier
2005-05-06 18:19 ` Drew Adams
2005-05-10 16:14 ` Per Abrahamsen
2005-05-10 18:32 ` Drew Adams
[not found] <mailman.4474.1115750087.2819.help-gnu-emacs@gnu.org>
2005-05-11 14:07 ` Stefan Monnier
2005-05-11 16:36 ` Drew Adams
2005-05-11 16:37 ` Drew Adams
[not found] <mailman.4674.1115829901.2819.help-gnu-emacs@gnu.org>
2005-05-11 18:32 ` Stefan Monnier
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=877jifnilm.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
/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).