From dc85ffffc88c08742072573539f8bfae9dcbbccb Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Jul 2021 10:56:21 +0200 Subject: [PATCH] Clarify -unload-feature in Coding Conventions * doc/lispref/tips.texi (Coding Conventions): Clarify when an unload function is useful (bug#21440). --- doc/lispref/tips.texi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 -- 2.39.2