interesting ... one of my projects-to-do is to create the concept of
"behavior", which ought to be "feature" or "package" but
both are already
taken. it's motivated by the fact that there's no standardized way to enable or
disable various packages. steve only made it worse by insisting [reasonably]
that the de-facto standard "load the file to enable it" needed to go away, but
not proposing any standard to replace it. i want to see something like
(register-behavior 'mouse-avoidance :filename "avoid.el" :version 3.51
:enable
(mouse-avoidance-mode 1) :disable (mouse-avoidance-mode 0) etc)
this could be a statement executed while the .el file loads; in that case, the
:filename is unnecessary and the name is automatically taken from the loading
file. the filename is there in case the registration is provided elsewhere,
e.g. you're adding register statements on behalf of existing packages you don't
want to modify. a relative name like this refers to the load-path.
(Multiple behaviors could be registered in a single .el file. We definitely do
not want to force the concept of a useful behavior to have anything to do with
files; many small behaviors could be in one file, and one behavior might require
many files.)
behaviors should choose their names carefully to try to avoid namespace clash.
again, don't use the typically short filename, and as a lesson from the two
infidels who created two unrelated whitespace-modes, make sure your behavior's
name describes exactly what it does.
if two of the same behaviors but of different versions get loaded at different
times, the more recent one wins -- although overall aspects like this can be
customized.
what think you?
"Stephen J. Turnbull" wrote:
>>>>> "Bruce" == Bruce Ingalls
<bruce(a)conde-dev.com> writes:
Bruce> After talking with fellow emacs developers, we would like
Bruce> to see a shared system (i.e. common to x & fsf/gnu emacs)
Bruce> for tracking versions of elisp libraries.
Bruce> I am recommending a syntax with 3 new optional arguments:
Bruce> (provide 'my-package 1 2 34)
#'provide is about features, not about libraries. Many libraries
provide multiple features; provision of some features often requires
multiple libraries. I don't know of any off hand, but there probably
are virtual features that are provided by multiple libraries.
Coordinating all this with version numbers seems hairy, to say the
least.
I would say implement library- (or file-) versioning separately from
#'provide.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/chronic-pain/