aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/tips.texi
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-07-16 10:56:21 +0200
committerLars Ingebrigtsen2021-07-16 10:56:21 +0200
commitdc85ffffc88c08742072573539f8bfae9dcbbccb (patch)
tree878ec058ac471f00b537ad59de1aac9ad7051a1d /doc/lispref/tips.texi
parent1cd278bfcd7970ebe7f00ec5bd692ecea031ec6d (diff)
downloademacs-dc85ffffc88c08742072573539f8bfae9dcbbccb.tar.gz
emacs-dc85ffffc88c08742072573539f8bfae9dcbbccb.zip
Clarify -unload-feature in Coding Conventions
* doc/lispref/tips.texi (Coding Conventions): Clarify when an unload function is useful (bug#21440).
Diffstat (limited to 'doc/lispref/tips.texi')
-rw-r--r--doc/lispref/tips.texi11
1 files 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}.
168 168
169@item 169@item
170@cindex unloading packages, preparing for 170@cindex unloading packages, preparing for
171If loading the file adds functions to hooks, define a function 171@code{unload-feature} will normally undo normal changes done by
172@code{@var{feature}-unload-function}, where @var{feature} is the name 172loading a feature (like adding adds functions to hooks). However, if
173of the feature the package provides, and make it undo any such 173loading @var{feature} does something more complex, define a function
174changes. Using @code{unload-feature} to unload the file will run this 174@code{@var{feature}-unload-function}, and make it undo any such
175function. @xref{Unloading}. 175changes. @code{unload-feature} will run this function.
176@xref{Unloading}.
176 177
177@item 178@item
178It is a bad idea to define aliases for the Emacs primitives. Normally 179It is a bad idea to define aliases for the Emacs primitives. Normally