diff options
| author | Lars Ingebrigtsen | 2021-07-16 10:56:21 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-16 10:56:21 +0200 |
| commit | dc85ffffc88c08742072573539f8bfae9dcbbccb (patch) | |
| tree | 878ec058ac471f00b537ad59de1aac9ad7051a1d /doc/lispref/tips.texi | |
| parent | 1cd278bfcd7970ebe7f00ec5bd692ecea031ec6d (diff) | |
| download | emacs-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.texi | 11 |
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 |
| 171 | If 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 | 172 | loading a feature (like adding adds functions to hooks). However, if |
| 173 | of the feature the package provides, and make it undo any such | 173 | loading @var{feature} does something more complex, define a function |
| 174 | changes. Using @code{unload-feature} to unload the file will run this | 174 | @code{@var{feature}-unload-function}, and make it undo any such |
| 175 | function. @xref{Unloading}. | 175 | changes. @code{unload-feature} will run this function. |
| 176 | @xref{Unloading}. | ||
| 176 | 177 | ||
| 177 | @item | 178 | @item |
| 178 | It is a bad idea to define aliases for the Emacs primitives. Normally | 179 | It is a bad idea to define aliases for the Emacs primitives. Normally |