Show
Ignore:
Timestamp:
04/04/08 22:04:40 (8 months ago)
Author:
miyoshi
Message:

Sync up with Emacs22.2.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lispref/loading.texi

    r4200 r4220  
    22@c This is part of the GNU Emacs Lisp Reference Manual. 
    33@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 
    4 @c   2002, 2003, 2004, 2005, 2006, 2007  Free Software Foundation, Inc. 
     4@c   2002, 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc. 
    55@c See the file elisp.texi for copying conditions. 
    66@setfilename ../info/loading 
     
    857857(Loading saves these in the @code{autoload} property of the symbol.) 
    858858 
    859 @vindex unload-feature-special-hooks 
    860859Before restoring the previous definitions, @code{unload-feature} runs 
    861860@code{remove-hook} to remove functions in the library from certain 
    862861hooks.  These hooks include variables whose names end in @samp{hook} 
    863862or @samp{-hooks}, plus those listed in 
    864 @code{unload-feature-special-hooks}.  This is to prevent Emacs from 
    865 ceasing to function because important hooks refer to functions that 
    866 are no longer defined. 
    867  
    868 @vindex @var{feature}-unload-hook 
     863@code{unload-feature-special-hooks}, as well as 
     864@code{auto-mode-alist}.  This is to prevent Emacs from ceasing to 
     865function because important hooks refer to functions that are no longer 
     866defined. 
     867 
     868Standard unloading activities also undoes ELP profiling of functions 
     869in that library, unprovides any features provided by the library, and 
     870cancels timers held in variables defined by the library. 
     871 
     872@vindex @var{feature}-unload-function 
    869873If these measures are not sufficient to prevent malfunction, a library 
    870 can define an explicit unload hook.  If @code{@var{feature}-unload-hook} 
    871 is defined, it is run as a normal hook before restoring the previous 
    872 definitions, @emph{instead of} the usual hook-removing actions.  The 
    873 unload hook ought to undo all the global state changes made by the 
    874 library that might cease to work once the library is unloaded. 
    875 @code{unload-feature} can cause problems with libraries that fail to do 
    876 this, so it should be used with caution. 
     874can define an explicit unloader named @code{@var{feature}-unload-function}. 
     875If that symbol is defined as a function, @code{unload-feature} calls 
     876it with no arguments before doing anything else.  It can do whatever 
     877is appropriate to unload the library.  If it returns @code{nil}, 
     878@code{unload-feature} proceeds to take the normal unload actions. 
     879Otherwise it considers the job to be done. 
    877880 
    878881Ordinarily, @code{unload-feature} refuses to unload a library on which