Commit dc85ffff authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Clarify -unload-feature in Coding Conventions

* doc/lispref/tips.texi (Coding Conventions): Clarify when an
unload function is useful (bug#21440).
parent 1cd278bf
Pipeline #11431 failed with stages
in 1 minute and 40 seconds
......@@ -168,11 +168,12 @@ follow the naming conventions for hooks. @xref{Hooks}.
@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.
It is a bad idea to define aliases for the Emacs primitives. Normally
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment