[Top][All Lists]

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

defcustom and autoload

From: nobrowser
Subject: defcustom and autoload
Date: Fri, 08 Jun 2007 20:01:50 -0700
User-agent: G2/1.0

I am quite confused about autoloading customization definitions.

Until now I have assumed it was a good idea to put ;;;###autoload
thingies before all my defcustom forms and to generate a foo-
autoloads.el file that users could load for "one stop" initialization
of my package.  Indeed it almost seemed that *not* doing it was like
forcing the user to experience wrong behaviour from the package first
to get the chance to adjust it.

I have not generated the foo-autoloads until now, because during
development I always load the code in toto from my .emacs.  But now I
have tried that, and I found that the settings I have in the custom-
set-variables block in my .emacs get overriden later when I load the
foo-autoloads.  This despite the fact that foo-autoloads seems to
contain defvar forms - which should refrain from setting a variable
that is already set.  What is special about the variable settings done
by custom-set-variables that makes them "soft" this way?

Then I looked at the Elisp files that come with Emacs.  I haven't gone
through all of them, but it seems almost *none* of them specify
autoloading for their defcustoms.  What gives?  Are users really
expected to load the whole library (and that assumes they know which
one) before being able to customize a variable in it?

reply via email to

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