mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-01 13:21:11 -08:00
Clarify -unload-feature in Coding Conventions
* doc/lispref/tips.texi (Coding Conventions): Clarify when an unload function is useful (bug#21440).
This commit is contained in:
parent
1cd278bfcd
commit
dc85ffffc8
1 changed files with 6 additions and 5 deletions
|
|
@ -168,11 +168,12 @@ follow the naming conventions for hooks. @xref{Hooks}.
|
|||
|
||||
@item
|
||||
@cindex unloading packages, preparing for
|
||||
If loading the file adds functions to hooks, define a function
|
||||
@code{@var{feature}-unload-function}, where @var{feature} is the name
|
||||
of the feature the package provides, and make it undo any such
|
||||
changes. Using @code{unload-feature} to unload the file will run this
|
||||
function. @xref{Unloading}.
|
||||
@code{unload-feature} will normally undo normal changes done by
|
||||
loading a feature (like adding adds functions to hooks). However, if
|
||||
loading @var{feature} does something more complex, define a function
|
||||
@code{@var{feature}-unload-function}, and make it undo any such
|
||||
changes. @code{unload-feature} will run this function.
|
||||
@xref{Unloading}.
|
||||
|
||||
@item
|
||||
It is a bad idea to define aliases for the Emacs primitives. Normally
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue