[Top][All Lists]

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

RE: defcustom: changing from defvar - order of execution

From: Drew Adams
Subject: RE: defcustom: changing from defvar - order of execution
Date: Fri, 6 May 2005 11:19:31 -0700

    > 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?

    > To me, it makes sense to generally avoid using user options
    at the top level
    > of the library that defines them, but I'm not sure such
    avoidance is always
    > feasible.

    What makes more sense is to discourage loading of packages in .emacs.
    Instead users should only set vars, setup autoloads, ...

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...

Users do sometimes call functions at top level in their .emacs; those
functions are sometimes defined by libraries that are loaded by the .emacs
(whether via autoload, require, or load-library); and the called functions
sometimes depend on user options defined in those same libraries. Is this
just "bad practice" on the part of users?

reply via email to

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