aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-06-26 20:10:57 +0000
committerRichard M. Stallman1998-06-26 20:10:57 +0000
commit6582d61ec5292f45f391af9a2c55054ef2bfab7f (patch)
treebe7ee51c429e4c7c212f6c0dcdfc8607e81cd400
parent5f29fdb2c9fcf4b19847446dcc307af6fe0f072f (diff)
downloademacs-6582d61ec5292f45f391af9a2c55054ef2bfab7f.tar.gz
emacs-6582d61ec5292f45f391af9a2c55054ef2bfab7f.zip
*** empty log message ***
-rw-r--r--lispref/loading.texi23
1 files changed, 23 insertions, 0 deletions
diff --git a/lispref/loading.texi b/lispref/loading.texi
index fb2e3014b85..093644354e7 100644
--- a/lispref/loading.texi
+++ b/lispref/loading.texi
@@ -687,6 +687,21 @@ library with @code{defun}, @code{defalias}, @code{defsubst},
687It then restores any autoloads formerly associated with those symbols. 687It then restores any autoloads formerly associated with those symbols.
688(Loading saves these in the @code{autoload} property of the symbol.) 688(Loading saves these in the @code{autoload} property of the symbol.)
689 689
690Before restoring the previous definitions, @code{unload-feature} runs
691@code{remove-hook} to remove functions in the library from certain
692hooks. These hooks include variables whose names end in @samp{hook} or
693@samp{-hooks}, plus those listed in @code{loadhist-special-hooks}. This
694is to prevent Emacs from ceasing to function because important hooks
695refer to functions that are no longer defined.
696
697@vindex @var{feature}-unload-hook
698If these measures are not sufficient to prevent malfunction, a library
699can define an explicit unload hook. If @code{@var{feature}-unload-hook}
700is defined, it is run as a normal hook before restoring the previous
701definitions, @emph{instead of} the usual hook-removing actions. The
702unload hook ought to undo all the global state changes made by the
703library that might cease to work once the library is unloaded.
704
690Ordinarily, @code{unload-feature} refuses to unload a library on which 705Ordinarily, @code{unload-feature} refuses to unload a library on which
691other loaded libraries depend. (A library @var{a} depends on library 706other loaded libraries depend. (A library @var{a} depends on library
692@var{b} if @var{a} contains a @code{require} for @var{b}.) If the 707@var{b} if @var{a} contains a @code{require} for @var{b}.) If the
@@ -726,6 +741,14 @@ The value of @code{load-history} may have one element whose @sc{car} is
726by adding the symbols defined to the element for the file being visited, 741by adding the symbols defined to the element for the file being visited,
727rather than replacing that element. @xref{Eval}. 742rather than replacing that element. @xref{Eval}.
728 743
744 Preloaded libraries don't contribute to @code{load-history}.
745
746@tindex loadhist-special-hooks
747@defvar loadhist-special-hooks
748This variable holds a list of hooks to be scanned before unloading a
749library, to remove functions defined in the library.
750@end defvar
751
729@node Hooks for Loading 752@node Hooks for Loading
730@section Hooks for Loading 753@section Hooks for Loading
731@cindex loading hooks 754@cindex loading hooks