From: Lars Ingebrigtsen Date: Fri, 16 Jul 2021 08:56:21 +0000 (+0200) Subject: Clarify -unload-feature in Coding Conventions X-Git-Tag: emacs-28.0.90~1845 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dc85ffffc88c08742072573539f8bfae9dcbbccb;p=emacs.git Clarify -unload-feature in Coding Conventions * doc/lispref/tips.texi (Coding Conventions): Clarify when an unload function is useful (bug#21440). --- diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 54cafffab38..a35847a74db 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -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