comparison man/custom.texi @ 38322:245114062ee0

Explain more clearly what it takes to make a customization permanent. Explain global vs local minor modes first thing, then list the modes.
author Richard M. Stallman <rms@gnu.org>
date Sun, 08 Jul 2001 16:45:01 +0000
parents 4face9462576
children c7b0f62e4dc5
comparison
equal deleted inserted replaced
38321:b3afd4436a00 38322:245114062ee0
8 8
9 This chapter talks about various topics relevant to adapting the 9 This chapter talks about various topics relevant to adapting the
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
24 independently of any others. 23 independently of any others.
25 * Variables:: Many Emacs commands examine Emacs variables 24 * Variables:: Many Emacs commands examine Emacs variables
59 if you wish. With no argument, the function turns the mode on if it was 58 if you wish. With no argument, the function turns the mode on if it was
60 off and off if it was on. This is known as @dfn{toggling}. A positive 59 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
73 mode}. @xref{Abbrevs}, for full information. 91 mode}. @xref{Abbrevs}, for full information.
74 92
146 ``deactivates'' the mark, so that commands that operate on the region 164 ``deactivates'' the mark, so that commands that operate on the region
147 will get an error. This means you must either set the mark, or 165 will get an error. This means you must either set the mark, or
148 explicitly ``reactivate'' it, before each command that uses the region. 166 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
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
169 @node Variables 170 @node Variables
170 @section Variables 171 @section Variables
171 @cindex variable 172 @cindex variable
172 @cindex option, user 173 @cindex option, user