diff options
| author | Dave Love | 2003-10-06 16:46:25 +0000 |
|---|---|---|
| committer | Dave Love | 2003-10-06 16:46:25 +0000 |
| commit | b68c6256afb00a08a2620a9c3e46d43b0e9f8c03 (patch) | |
| tree | b5254b6168a661dfc1be7749838fd6dc0a11cf58 | |
| parent | 04b6b342086db09373dc8ed52a83240563d3e24f (diff) | |
| download | emacs-b68c6256afb00a08a2620a9c3e46d43b0e9f8c03.tar.gz emacs-b68c6256afb00a08a2620a9c3e46d43b0e9f8c03.zip | |
Package unloading. Index next-line, previous-line, forward-line.
| -rw-r--r-- | lispref/tips.texi | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lispref/tips.texi b/lispref/tips.texi index d07fa1b3712..8c6e19eae9a 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi | |||
| @@ -210,7 +210,16 @@ off, and make it autoload (@pxref{Autoload}). Design the package so | |||
| 210 | that simply loading it has no visible effect---that should not enable | 210 | that simply loading it has no visible effect---that should not enable |
| 211 | the feature.@footnote{Consider that the package may be loaded | 211 | the feature.@footnote{Consider that the package may be loaded |
| 212 | arbitrarily by Custom for instance.} Users will request the feature by | 212 | arbitrarily by Custom for instance.} Users will request the feature by |
| 213 | invoking the command. | 213 | invoking the command, which will often be constructed as a minor mode. |
| 214 | |||
| 215 | @cindex unloading packages | ||
| 216 | If your package contains functions which do modify oridinary Emacs | ||
| 217 | behavior, for instance by adding functions to hooks, define a function | ||
| 218 | @code{@var{feature}-unload-hook} where @var{feature} is the name of | ||
| 219 | the feature the package provides. This function should undo any such | ||
| 220 | changes, e.g.@: by turning off a minor mode, when | ||
| 221 | @findex unload-feature | ||
| 222 | @code{unload-feature} is used. | ||
| 214 | 223 | ||
| 215 | @item | 224 | @item |
| 216 | It is a bad idea to define aliases for the Emacs primitives. Use the | 225 | It is a bad idea to define aliases for the Emacs primitives. Use the |
| @@ -248,6 +257,9 @@ will be 14 characters or less, which is short enough to fit on all kinds | |||
| 248 | of Unix systems. | 257 | of Unix systems. |
| 249 | 258 | ||
| 250 | @item | 259 | @item |
| 260 | @findex next-line | ||
| 261 | @findex previous-line | ||
| 262 | @findex forward-line | ||
| 251 | Don't use @code{next-line} or @code{previous-line} in programs; nearly | 263 | Don't use @code{next-line} or @code{previous-line} in programs; nearly |
| 252 | always, @code{forward-line} is more convenient as well as more | 264 | always, @code{forward-line} is more convenient as well as more |
| 253 | predictable and robust. @xref{Text Lines}. | 265 | predictable and robust. @xref{Text Lines}. |