diff options
| author | Richard M. Stallman | 2001-07-08 16:45:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-07-08 16:45:01 +0000 |
| commit | da6e9d86abb9abd281b732a750f8dbb164e06fb5 (patch) | |
| tree | 5e3ea29c212fffdcfd73eb87f2258b59df380b43 | |
| parent | 24b97d4bf8cb03379c1b7e9ffe21a5ce3e657ba1 (diff) | |
| download | emacs-da6e9d86abb9abd281b732a750f8dbb164e06fb5.tar.gz emacs-da6e9d86abb9abd281b732a750f8dbb164e06fb5.zip | |
Explain more clearly what it takes to make a customization permanent.
Explain global vs local minor modes first thing, then list the modes.
| -rw-r--r-- | man/custom.texi | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/man/custom.texi b/man/custom.texi index bd554b5d4e8..ddd51360177 100644 --- a/man/custom.texi +++ b/man/custom.texi | |||
| @@ -10,14 +10,13 @@ | |||
| 10 | behavior of Emacs in minor ways. See @cite{The Emacs Lisp Reference | 10 | behavior of Emacs in minor ways. See @cite{The Emacs Lisp Reference |
| 11 | Manual} for how to make more far-reaching changes. | 11 | Manual} for how to make more far-reaching changes. |
| 12 | 12 | ||
| 13 | All kinds of customization affect only the particular Emacs session | 13 | Customization that you do within Emacs normally affects only the |
| 14 | that you do them in. They are completely lost when you kill the Emacs | 14 | particular Emacs session that you do it in--it does not persist |
| 15 | session, and have no effect on other Emacs sessions you may run at the | 15 | between sessions unless you save the customization in a file such as |
| 16 | same time or later. The only way an Emacs session can affect anything | 16 | @file{.emacs} or @file{.Xdefaults} that will change future sessions. |
| 17 | outside of it is by writing a file; in particular, the only way to make | 17 | @xref{Init File}. In the customization buffer, if you use a |
| 18 | a customization ``permanent'' is to put something in your @file{.emacs} | 18 | command to save customizations for future sessions, this actually |
| 19 | file or other appropriate file to do the customization in each session. | 19 | works by editing @file{.emacs} for you. |
| 20 | @xref{Init File}. | ||
| 21 | 20 | ||
| 22 | @menu | 21 | @menu |
| 23 | * Minor Modes:: Each minor mode is one feature you can turn on | 22 | * Minor Modes:: Each minor mode is one feature you can turn on |
| @@ -61,12 +60,31 @@ off and off if it was on. This is known as @dfn{toggling}. A positive | |||
| 61 | argument always turns the mode on, and an explicit zero argument or a | 60 | argument always turns the mode on, and an explicit zero argument or a |
| 62 | negative argument always turns it off. | 61 | negative argument always turns it off. |
| 63 | 62 | ||
| 64 | Enabling or disabling some minor modes applies only to the current | 63 | Some minor modes are global: while enabled, they affect everything |
| 65 | buffer; each buffer is independent of the other buffers. Therefore, you | 64 | you do in the Emacs session, in all buffers. Other minor modes are |
| 66 | can enable the mode in particular buffers and disable it in others. The | 65 | buffer-local; they apply only to the current buffer, so you can enable |
| 67 | per-buffer minor modes include Abbrev mode, Auto Fill mode, Auto Save | 66 | the mode in certain buffers and not others. |
| 68 | mode, Font-Lock mode, ISO Accents mode, Outline minor | 67 | |
| 69 | mode, Overwrite mode, and Binary Overwrite mode. | 68 | For most minor modes, the command name is also the name of a |
| 69 | variable which directly controls the mode. The mode is enabled | ||
| 70 | whenever this variable's value is non-@code{nil}, and the minor-mode | ||
| 71 | command works by setting the variable. For example, the command | ||
| 72 | @code{outline-minor-mode} works by setting the value of | ||
| 73 | @code{outline-minor-mode} as a variable; it is this variable that | ||
| 74 | directly turns Outline minor mode on and off. To check whether a | ||
| 75 | given minor mode works this way, use @kbd{C-h v} to ask for | ||
| 76 | documentation on the variable name. | ||
| 77 | |||
| 78 | These minor-mode variables provide a good way for Lisp programs to turn | ||
| 79 | minor modes on and off; they are also useful in a file's local variables | ||
| 80 | list. But please think twice before setting minor modes with a local | ||
| 81 | variables list, because most minor modes are matter of user | ||
| 82 | preference---other users editing the same file might not want the same | ||
| 83 | minor modes you prefer. | ||
| 84 | |||
| 85 | The buffer-local minor modes include Abbrev mode, Auto Fill mode, | ||
| 86 | Auto Save mode, Font-Lock mode, ISO Accents mode, Outline minor mode, | ||
| 87 | Overwrite mode, and Binary Overwrite mode. | ||
| 70 | 88 | ||
| 71 | Abbrev mode allows you to define abbreviations that automatically expand | 89 | Abbrev mode allows you to define abbreviations that automatically expand |
| 72 | as you type them. For example, @samp{amd} might expand to @samp{abbrev | 90 | as you type them. For example, @samp{amd} might expand to @samp{abbrev |
| @@ -149,23 +167,6 @@ explicitly ``reactivate'' it, before each command that uses the region. | |||
| 149 | The advantage of Transient Mark mode is that Emacs can display the | 167 | The advantage of Transient Mark mode is that Emacs can display the |
| 150 | region highlighted (currently only when using X). @xref{Mark}. | 168 | region highlighted (currently only when using X). @xref{Mark}. |
| 151 | 169 | ||
| 152 | For most minor modes, the command name is also the name of a variable | ||
| 153 | which directly controls the mode. The mode is enabled whenever this | ||
| 154 | variable's value is non-@code{nil}, and the minor-mode command works by | ||
| 155 | setting the variable. For example, the command | ||
| 156 | @code{outline-minor-mode} works by setting the value of | ||
| 157 | @code{outline-minor-mode} as a variable; it is this variable that | ||
| 158 | directly turns Outline minor mode on and off. To check whether a given | ||
| 159 | minor mode works this way, use @kbd{C-h v} to ask for documentation on | ||
| 160 | the variable name. | ||
| 161 | |||
| 162 | These minor-mode variables provide a good way for Lisp programs to turn | ||
| 163 | minor modes on and off; they are also useful in a file's local variables | ||
| 164 | list. But please think twice before setting minor modes with a local | ||
| 165 | variables list, because most minor modes are matter of user | ||
| 166 | preference---other users editing the same file might not want the same | ||
| 167 | minor modes you prefer. | ||
| 168 | |||
| 169 | @node Variables | 170 | @node Variables |
| 170 | @section Variables | 171 | @section Variables |
| 171 | @cindex variable | 172 | @cindex variable |