[Top][All Lists]

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

Re: defcustom: changing from defvar - order of execution

From: Stefan Monnier
Subject: Re: defcustom: changing from defvar - order of execution
Date: Sat, 07 May 2005 11:56:22 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> I see things like this fairly commonly, at the top level of the standard
>> Emacs libraries:

>     All these examples don't seem relevant since nowhere is it
>     suggested to the user to load the library in her .emacs.

> Fair enough. But if a user does end up loading such a library during startup
> (i.e. via .emacs) - whether by autoload or explicit load, the problem
> arises, no?

Could be, but I haven't seen it mentioned very often so it doesn't seem to
be a common problem.  Probably because it requires that people edit their
.emacs by hand.  I think there are 3 common safe scenarios:
1 - for everything relating to package FOO the user uses only Custom.
2 - for everything relating to package FOO the user doesn't use Custom and
    does all the configuration by hand in her .emacs.
3 - the user mixes up the two, but is aware that the relative position of
    the manual customizations and of the custom-set-variables is important.

The only dangerous case is when the user mixes Custom and manual .emacs
editing and doesn't pay attention to the relative position of the two styles
of customization.

> Granted, but what if a user wants to systematically do something at startup
> that is provided by a library? Autoload etc. are fine, but what if the user
> wants to call a library-defined function at each startup? Whether it's a
> command to show daily appointments or whatever...

Then she'll put it at the end of her .emacs because otherwise other
customizations will be missing.  Duh!

Every once in a while someone comes here with exactly this problem, where
she put her (desktop-load-default) at the beginning of her .emacs instead of
putting it at the end.

There's really not much we can do, and this problem is not directly related
to Custom since it occurs with other things as well.


reply via email to

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