When `unload-feature' is called, it unbinds all of the symbols
provided by a package, and removes the feature symbol from the
features list.
When a `defvar' or `defcustom' variable symbol from a feature is
`makunbound', does that remove values set by the user with `setq' or
`customize'? If so, then this situation needs to be handled
correctly by `unload-feature' somehow.
I suppose that it also ought to handle unlinking DSO's as well.
What about open processes or ports held by something in the feature?
What other resources might be held that should be freed up? How can
these things be accomplished? (YTMAWBK)
This also implies that if a hook function is added to a hook as the
function itself (using #') rather than as the symbol containing the
function, it will remain in that hook list in it's original form. If
the symbol whos function cell contains the function is put in the
hook list instead, then it will refer to an autoload form. Therefore
`add-hook' should always be called with a type `symbolp' for
FUNCTION, rather than a type `functionp'.
Is this correct?
What about having an `unload-feature-hook'? When would it be run? I
suppose that it obviously has to be run prior to unbinding the value
and function cell of a symbol... Hmmm. Prior to unbinding any of
them, not each time one is unbound.
Has anyone ever tried to devise a package system for X?Emacs based on
multiple obarrays? The idea has crossed my mind a number of times,
but I have not thought it through very much. It would require
changes to the evaluator, I think. What if an obarray had, like a
keymap, a parent obarry? I suppose it would then need to have
siblings as well... Hmmm.
--
Those who do not study Lisp are doomed to reimplement it - Poorly.
A few months in the laboratory often saves several hours at the library.
mailto:karlhegļ¼ debian.org (Karl M. Hegbloom)
Show replies by date