[Top][All Lists]

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

autoload cookies for defcustoms

From: Drew Adams
Subject: autoload cookies for defcustoms
Date: Sat, 23 Jan 2010 10:31:28 -0800

Just curious. Is there a policy, for the Lisp code distributed with Emacs, about
using autoload cookies for defcustoms? If so, what is it?

Looking through the code, it seems that most defcustoms are not autoloaded, but
some are. And in the same library some might be and others not.

Some use `purecopy' for their values, so I guess it makes sense to autoload
those. But it's not clear which came first, the cookie or the decision to use

If, in some library, only the options that use `purecopy' are autoloaded,
doesn't that give a misleading impression to users of `C-h v'? They see only the
`purecopy' ones (before loading), which aren't necessarily the most important to
know about.

IOW, are there two conflicting criteria for autoloading an option: (1) its
importance or frequency of use or the need for users to know about it before
loading vs (2) the purely technical (implementation) criterion of its use of
`purecopy'. Shouldn't the only criterion be use- and user-centered (i.e., #1)?

Some options that do not use `purecopy' are nevertheless autoloaded. And some
that do use `purecopy' do not have an autoload cookie - e.g.,
`epa-file-name-regexp', `automount-dir-prefix', `directory-free-space-program',
`search-whitespace-regexp', `jka-compr-load-suffixes', `rmail-file-name',
`site-run-file', `initial-scratch-message', `vc-directory-exclusion-list',
`adaptive-fill-regexp', `adaptive-fill-first-line-regexp'. (Is that wrong, or
are all of those libraries always preloaded?)

If there is no general policy, and this is decided individually for each
defcustom, then just what considerations affect the judgment? And why is there
such variability among libraries?

The same question could apply to command definitions, but there there doesn't
seem to be such a difference among libraries for them. Most commands seem to
have autoload cookies (just as most options do not), and I'm guessing that those
commands that do not are considered to be less often used.

reply via email to

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