aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-01-05 19:09:27 +0800
committerChong Yidong2012-01-05 19:09:27 +0800
commitb0d7d8af0743998f6d9161b28d269e100b415861 (patch)
tree22d790fc2444838a921dbf3e29c74556178fc561
parentacaf905b1130aae80fa59d2c861ffd4c8eb75486 (diff)
downloademacs-b0d7d8af0743998f6d9161b28d269e100b415861.tar.gz
emacs-b0d7d8af0743998f6d9161b28d269e100b415861.zip
Update the Customization chapter of Emacs manual.
* doc/emacs/custom.texi (Customization Groups): Update example. (Browsing Custom): Document the new search field. (Changing a Variable): Update example for Emacs 24 changes. Document Custom-set and Custom-save commands. (Face Customization): Document Emacs 24 changes. De-document modify-face. (Specific Customization): Mention customize-variable. (Custom Themes): Add customize-themes, custom-theme-load-path, custom-theme-directory, and describe-theme. (Creating Custom Themes): New node. (Examining): Mention M-:. * doc/emacs/package.texi (Packages): Fix typo.
-rw-r--r--admin/FOR-RELEASE1
-rw-r--r--doc/emacs/ChangeLog16
-rw-r--r--doc/emacs/custom.texi802
-rw-r--r--doc/emacs/emacs.texi11
-rw-r--r--doc/emacs/package.texi8
-rw-r--r--etc/NEWS9
6 files changed, 482 insertions, 365 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 91576dd4c8a..337425530f0 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -162,6 +162,7 @@ msdog.texi
162msdog-xtra.texi 162msdog-xtra.texi
163mule.texi 163mule.texi
164m-x.texi cyd 164m-x.texi cyd
165package.texi cyd
165picture-xtra.texi 166picture-xtra.texi
166programs.texi cyd 167programs.texi cyd
167regs.texi cyd 168regs.texi cyd
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index c99c64eea68..9d6ab3ee6cf 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,19 @@
12012-01-05 Chong Yidong <cyd@gnu.org>
2
3 * custom.texi (Customization Groups): Update example.
4 (Browsing Custom): Document the new search field.
5 (Changing a Variable): Update example for Emacs 24 changes.
6 Document Custom-set and Custom-save commands.
7 (Face Customization): Document Emacs 24 changes. De-document
8 modify-face.
9 (Specific Customization): Mention customize-variable.
10 (Custom Themes): Add customize-themes, custom-theme-load-path,
11 custom-theme-directory, and describe-theme.
12 (Creating Custom Themes): New node.
13 (Examining): Mention M-:.
14
15 * package.texi (Packages): Fix typo.
16
12012-01-03 Chong Yidong <cyd@gnu.org> 172012-01-03 Chong Yidong <cyd@gnu.org>
2 18
3 * misc.texi (Single Shell): Don't document Lisp usage of 19 * misc.texi (Single Shell): Don't document Lisp usage of
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 370a3126823..57fdeefec7e 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -37,280 +37,284 @@ Reference Manual}.
37@section Easy Customization Interface 37@section Easy Customization Interface
38 38
39@cindex settings 39@cindex settings
40 Emacs has many @dfn{settings} which have values that you can change. 40@cindex user option
41Many are documented in this manual. Most settings are @dfn{user 41@cindex customizable variable
42options}---that is to say, Lisp variables (@pxref{Variables})---and 42 Emacs has many @dfn{settings} which you can change. Most settings
43their names appear in the Variable Index (@pxref{Variable Index}). 43are @dfn{customizable variables} (@pxref{Variables}), which are also
44The other settings are faces and their attributes (@pxref{Faces}). 44called @dfn{user options}. There is a huge number of customizable
45variables, controlling numerous aspects of Emacs behavior; the
46variables documented in this manual are listed in @ref{Variable
47Index}. A separate class of settings are the @dfn{faces}, which
48determine the fonts, colors, and other attributes of text
49(@pxref{Faces}).
45 50
46@findex customize 51@findex customize
47@cindex customization buffer 52@cindex customization buffer
48 You can browse settings and change them using @kbd{M-x customize}. 53 To browse and alter settings (both variables and faces), type
49This creates a @dfn{customization buffer}, which lets you navigate 54@kbd{M-x customize}. This creates a @dfn{customization buffer}, which
50through a logically organized list of settings, edit and set their 55lets you navigate through a logically organized list of settings, edit
51values, and save them permanently in your initialization file 56and set their values, and save them permanently.
52(@pxref{Init File}).
53 57
54@menu 58@menu
55* Customization Groups:: How settings are classified in a structure. 59* Customization Groups:: How settings are classified.
56* Browsing Custom:: Browsing and searching for settings. 60* Browsing Custom:: Browsing and searching for settings.
57* Changing a Variable:: How to edit an option's value and set the option. 61* Changing a Variable:: How to edit an option's value and set the option.
58* Saving Customizations:: Specifying the file for saving customizations. 62* Saving Customizations:: Saving customizations for future Emacs sessions.
59* Face Customization:: How to edit the attributes of a face. 63* Face Customization:: How to edit the attributes of a face.
60* Specific Customization:: Making a customization buffer for specific 64* Specific Customization:: Customizing specific settings or groups.
61 variables, faces, or groups. 65* Custom Themes:: Collections of customization settings.
62* Custom Themes:: How to define collections of customized options 66* Creating Custom Themes:: How to create a new custom theme.
63 that can be loaded and unloaded together.
64@end menu 67@end menu
65 68
66@node Customization Groups 69@node Customization Groups
67@subsection Customization Groups 70@subsection Customization Groups
68@cindex customization groups 71@cindex customization groups
69 72
70 For customization purposes, settings are organized into @dfn{groups} 73 Customization settings are organized into @dfn{customization
71to help you find them. Groups are collected into bigger groups, all 74groups}. These groups are collected into bigger groups, all the way
72the way up to a master group called @code{Emacs}. 75up to a master group called @code{Emacs}.
73 76
74 @kbd{M-x customize} creates a customization buffer that shows the 77 @kbd{M-x customize} creates a customization buffer that shows the
75top-level @code{Emacs} group and the second-level groups immediately 78top-level @code{Emacs} group. It looks like this, in part:
76under it. It looks like this, in part:
77 79
78@c we want the buffer example to all be on one page, but unfortunately 80@c we want the buffer example to all be on one page, but unfortunately
79@c that's quite a bit of text, so force all space to the bottom. 81@c that's quite a bit of text, so force all space to the bottom.
80@page 82@page
81@smallexample 83@smallexample
82@group 84@group
83/- Emacs group: Customization of the One True Editor. -------------\ 85To apply changes, use the Save or Set buttons.
84 [State]: visible group members are all at standard values. 86For details, see [Saving Customizations] in the [Emacs manual].
87
88________________________________________ [ Search ]
85 89
86 See also [Manual]. 90 Operate on all settings in this buffer:
91 [ Set for current session ] [ Save for future sessions ]
92 [ Undo edits ] [ Reset to saved ] [ Erase customizations ] [ Exit ]
93
94
95Emacs group: Customization of the One True Editor.
96 [State]: visible group members are all at standard values.
97 See also [Manual].
87 98
88[Editing] : Basic text editing facilities. 99[Editing] : Basic text editing facilities.
89 100
90[External] : Interfacing to external utilities. 101[Convenience] : Convenience features for faster editing.
91 102
92@var{more second-level groups} 103@var{more second-level groups}
93
94\- Emacs group end ------------------------------------------------/
95@end group 104@end group
96@end smallexample 105@end smallexample
97 106
98@noindent 107@noindent
99This says that the buffer displays the contents of the @code{Emacs} 108The main part of this buffer shows the @samp{Emacs} customization
100group. The other groups are listed because they are its contents. But 109group, which contains several other groups (@samp{Editing},
101they are listed differently, without indentation and dashes, because 110@samp{Convenience}, etc.). The contents of those groups are not
102@emph{their} contents are not included. Each group has a single-line 111listed here, only one line of documentation each.
103documentation string; the @code{Emacs} group also has a @samp{[State]} 112
104line. 113 The @dfn{state} of the group indicates whether setting in that group
114has been edited, set or saved. @xref{Changing a Variable}.
105 115
106@cindex editable fields (customization buffer) 116@cindex editable fields (customization buffer)
107@cindex buttons (customization buffer) 117@cindex buttons (customization buffer)
108@cindex links (customization buffer) 118@cindex links (customization buffer)
109 Most of the text in the customization buffer is read-only, but it 119 Most of the customization buffer is read-only, but it includes some
110typically includes some @dfn{editable fields} that you can edit. 120@dfn{editable fields} that you can edit. For example, at the top of
111There are also @dfn{buttons} and @dfn{links}, which do something when 121the customization buffer is an editable field for searching for
112you @dfn{invoke} them. To invoke a button or a link, either click on 122settings (@pxref{Browsing Custom}). There are also @dfn{buttons} and
113it with @kbd{Mouse-1}, or move point to it and type @key{RET}. 123@dfn{links}, which you can activate by either clicking with the mouse,
114 124or moving point there and typing @key{RET}. For example, the group
115 For example, the phrase @samp{[State]} that appears in a 125names like @samp{[Editing]} are links; activating one of these links
116second-level group is a button. It operates on the same customization 126brings up the customization buffer for that group.
117buffer. Each group name, such as @samp{[Editing]}, is a hypertext 127
118link to that group; invoking it creates a new customization buffer, 128@kindex TAB @r{(customization buffer)}
119showing the group and its contents. 129@kindex S-TAB @r{(customization buffer)}
120 130@findex widget-forward
121 The @code{Emacs} group only contains other groups. These groups, in 131@findex widget-backward
122turn, can contain settings or still more groups. By browsing the 132 In the customizable buffer, you can type @key{TAB}
123hierarchy of groups, you will eventually find the feature you are 133(@code{widget-forward}) to move forward to the next button or editable
124interested in customizing. Then you can use the customization buffer 134field. @kbd{S-@key{TAB}} (@code{widget-backward}) moves back to the
125to set that feature's settings. You can also go straight to a 135previous button or editable field.
126particular group by name, using the command @kbd{M-x customize-group}.
127 136
128@node Browsing Custom 137@node Browsing Custom
129@subsection Browsing and Searching for Options and Faces 138@subsection Browsing and Searching for Settings
130@findex customize-browse 139@findex customize-browse
131 140
141 From the top-level customization buffer created by @kbd{M-x
142customize}, you can follow the links to the subgroups of the
143@samp{Emacs} customization group. These subgroups may contain
144settings for you to customize; they may also contain futher subgroups,
145dealing with yet more specialized subsystems of Emacs. As you
146navigate the hierarchy of customization groups, you should find some
147settings that you want to customize.
148
149 If you are interested in customizing a particular setting or
150customization group, you can go straight there with the commands
151@kbd{M-x customize-option}, @kbd{M-x customize-face}, or @kbd{M-x
152customize-group}. @xref{Specific Customization}.
153
154@vindex custom-search-field
155 If you don't know exactly what groups or settings you want to
156customize, you can search for them using the editable search field at
157the top of each customization buffer. Here, you can type in a search
158term---either one or more words separated by spaces, or a regular
159expression (@pxref{Regexps}). Then type @key{RET} in the field, or
160activate the @samp{Search} button next to it, to switch to a
161customization buffer containing groups and settings that match those
162terms. Note, however, that this feature only finds groups and
163settings that are loaded in the current Emacs session.
164
165 If you don't want customization buffers to show the search field,
166change the variable @code{custom-search-field} to @code{nil}.
167
168 The command @kbd{M-x customize-apropos} is similar to using the
169search field, except that it reads the search term(s) using the
170minibuffer. @xref{Specific Customization}.
171
132 @kbd{M-x customize-browse} is another way to browse the available 172 @kbd{M-x customize-browse} is another way to browse the available
133settings. This command creates a special customization buffer which 173settings. This command creates a special customization buffer which
134shows only the names of groups and settings, and puts them in a 174shows only the names of groups and settings, in a structured layout.
135structure. 175You can show the contents of a group, in the same buffer, by invoking
136 176the @samp{[+]} button next to the group name. When the group contents
137 In this buffer, you can show the contents of a group by invoking the 177are shown, the button changes to @samp{[-]}; invoking that hides the
138@samp{[+]} button. When the group contents are visible, this button 178group contents again. Each group or setting in this buffer has a link
139changes to @samp{[-]}; invoking that hides the group contents again. 179which says @samp{[Group]}, @samp{[Option]} or @samp{[Face]}. Invoking
140 180this link creates an ordinary customization buffer showing just that
141 Each group or setting in this buffer has a link which says 181group, option, or face; this is the way to change settings that you
142@samp{[Group]}, @samp{[Option]} or @samp{[Face]}. Invoking this link 182find with @kbd{M-x customize-browse}.
143creates an ordinary customization buffer showing just that group and
144its contents, just that user option, or just that face. This is the
145way to change settings that you find with @kbd{M-x customize-browse}.
146
147 If you can guess part of the name of the settings you are interested
148in, @kbd{M-x customize-apropos} is another way to search for settings.
149However, unlike @code{customize} and @code{customize-browse},
150@code{customize-apropos} can only find groups and settings that are
151loaded in the current Emacs session. @xref{Specific Customization,,
152Customizing Specific Items}.
153 183
154@node Changing a Variable 184@node Changing a Variable
155@subsection Changing a Variable 185@subsection Changing a Variable
156 186
157 Here is an example of what a variable (a user option) looks like in 187 Here is an example of what a variable, or user option, looks like in
158the customization buffer: 188the customization buffer:
159 189
160@smallexample 190@smallexample
161Kill Ring Max: [Hide Value] 60 191[Hide] Kill Ring Max: 60
162 [State]: STANDARD. 192 [State]: STANDARD.
163Maximum length of kill ring before oldest elements are thrown away. 193 Maximum length of kill ring before oldest elements are thrown away.
164@end smallexample 194@end smallexample
165 195
166 The text following @samp{[Hide Value]}, @samp{60} in this case, indicates 196 The first line shows that the variable is named
167the current value of the variable. If you see @samp{[Show Value]} instead of 197@code{kill-ring-max}, formatted as @samp{Kill Ring Max} for easier
168@samp{[Hide Value]}, it means that the value is hidden; the customization 198viewing. Its value is @samp{60}. The button labeled @samp{[Hide]},
169buffer initially hides values that take up several lines. Invoke 199if activated, hides the variable's value and state; this is useful to
170@samp{[Show Value]} to show the value. 200avoid cluttering up the customization buffer with very long values
201(for this reason, variables that have very long values may start out
202hidden). If you use the @samp{[Hide]} button, it changes to
203@samp{[Show Value]}, which you can activate to reveal the value and
204state. On a graphical display, the @samp{[Hide]} and @samp{[Show
205Value]} buttons are replaced with graphical triangles pointing
206downwards and rightwards respectively.
171 207
172 The line after the variable name indicates the @dfn{customization 208 The line after the variable name indicates the @dfn{customization
173state} of the variable: in the example above, it says you have not 209state} of the variable: in this example, @samp{STANDARD} means you
174changed the option yet. The @samp{[State]} button at the beginning of 210have not changed the variable, so its value is the default one. The
175this line gives you a menu of various operations for customizing the 211@samp{[State]} button gives a menu of operations for customizing the
176variable. 212variable.
177 213
178 The line after the @samp{[State]} line displays the beginning of the 214 Below the customization state is the documentation for the variable.
179variable's documentation string. If there are more lines of 215This is the same documentation that would be shown by the @kbd{C-h v}
180documentation, this line ends with a @samp{[More]} button; invoke that 216command (@pxref{Examining}). If the documentation is more than one
181to show the full documentation string. 217line long, only one line may be shown. If so, that line ends with a
218@samp{[More]} button; activate this to see the full documentation.
182 219
183 To enter a new value for @samp{Kill Ring Max}, move point to the 220@cindex user options, changing
184value and edit it textually. For example, you can type @kbd{M-d}, 221@cindex customizing variables
185then insert another number. As you begin to alter the text, you will 222@cindex variables, changing
186see the @samp{[State]} line change to say that you have edited the 223 To enter a new value for @samp{Kill Ring Max}, just move point to
187value: 224the value and edit it. For example, type @kbd{M-d} to delete the
225@samp{60} and type in another number. As you begin to alter the text,
226the @samp{[State]} line will change:
188 227
189@smallexample 228@smallexample
190[State]: EDITED, shown value does not take effect until you set or @r{@dots{}} 229[State]: EDITED, shown value does not take effect until you
191 save it. 230 set or save it.
192@end smallexample 231@end smallexample
193 232
194@cindex user options, how to set 233@noindent
195@cindex variables, how to set 234Editing the value does not make it take effect right away. To do
196@cindex settings, how to set 235that, you must @dfn{set} the variable by activating the @samp{[State]}
197 Editing the value does not actually set the variable. To do that, 236button and choosing @samp{Set for Current Session}. Then the
198you must @dfn{set} the variable. To do this, invoke the 237variable's state becomes:
199@samp{[State]} button and choose @samp{Set for Current Session}.
200
201 The state of the variable changes visibly when you set it:
202 238
203@smallexample 239@smallexample
204[State]: SET for current session only. 240[State]: SET for current session only.
205@end smallexample 241@end smallexample
206 242
207 You don't have to worry about specifying a value that is not valid; 243@noindent
244You don't have to worry about specifying a value that is not valid;
208the @samp{Set for Current Session} operation checks for validity and 245the @samp{Set for Current Session} operation checks for validity and
209will not install an unacceptable value. 246will not install an unacceptable value.
210 247
211@kindex M-TAB @r{(customization buffer)} 248@kindex M-TAB @r{(customization buffer)}
249@kindex C-M-i @r{(customization buffer)}
212@findex widget-complete 250@findex widget-complete
213 While editing a field that is a file name, directory name, 251 While editing certain kinds of values, such as file names, directory
214command name, or anything else for which completion is defined, you 252names, and Emacs command names, you can perform completion with
215can type @kbd{M-@key{TAB}} (@code{widget-complete}) to do completion. 253@kbd{C-M-i} (@code{widget-complete}), or the equivalent keys
216(@kbd{@key{ESC} @key{TAB}} and @kbd{C-M-i} do the same thing.) 254@kbd{M-@key{TAB}} or @kbd{@key{ESC} @key{TAB}}. This behaves much
217 255like minibuffer completion (@pxref{Completion}).
218 Some variables have a small fixed set of possible legitimate values. 256
219These variables don't let you edit the value textually. Instead, a 257 Typing @key{RET} on an editable value field moves point forward to
220@samp{[Value Menu]} button appears before the value; invoke this 258the next field or button, like @key{TAB}. You can thus type @key{RET}
221button to change the value. For a boolean ``on or off'' value, the 259when you are finished editing a field, to move on to the next button
222button says @samp{[Toggle]}, and it changes to the other value. 260or field. To insert a newline within an editable field, use @kbd{C-o}
223@samp{[Value Menu]} and @samp{[Toggle]} simply edit the buffer; the 261or @kbd{C-q C-j}.
224changes take real effect when you use the @samp{Set for Current 262
225Session} operation. 263 For some variables, there is only a fixed set of legitimate values,
264and you are not allowed to edit the value directly. Instead, a
265@samp{[Value Menu]} button appears before the value; activating this
266button presents a choice of values. For a boolean ``on or off''
267value, the button says @samp{[Toggle]}, and flips the value. After
268using the @samp{[Value Menu]} or @samp{[Toggle]} button, you must
269again set the variable to make the chosen value take effect.
226 270
227 Some variables have values with complex structure. For example, the 271 Some variables have values with complex structure. For example, the
228value of @code{file-coding-system-alist} is an association list. Here 272value of @code{minibuffer-frame-alist} is an association list. Here
229is how it appears in the customization buffer: 273is how it appears in the customization buffer:
230 274
231@smallexample 275@smallexample
232File Coding System Alist: [Hide Value] 276[Hide] Minibuffer Frame Alist:
233[INS] [DEL] File regexp: \.elc\' 277[INS] [DEL] Parameter: width
234 Choice: [Value Menu] Encoding/decoding pair: 278 Value: 80
235 Decoding: emacs-mule 279[INS] [DEL] Parameter: height
236 Encoding: emacs-mule 280 Value: 2
237[INS] [DEL] File regexp: \(\`\|/\)loaddefs.el\'
238 Choice: [Value Menu] Encoding/decoding pair:
239 Decoding: raw-text
240 Encoding: raw-text-unix
241[INS] [DEL] File regexp: \.tar\'
242 Choice: [Value Menu] Encoding/decoding pair:
243 Decoding: no-conversion
244 Encoding: no-conversion
245[INS] [DEL] File regexp:
246 Choice: [Value Menu] Encoding/decoding pair:
247 Decoding: undecided
248 Encoding: nil
249[INS] 281[INS]
250 [State]: STANDARD. 282 [ State ]: STANDARD.
251Alist to decide a coding system to use for a file I/O @r{@dots{}} 283 Alist of parameters for the initial minibuffer frame. [Hide]
252 operation. [Hide Rest] 284 @r{[@dots{}more lines of documentation@dots{}]}
253The format is ((PATTERN . VAL) ...),
254where PATTERN is a regular expression matching a file name,
255@r{[@dots{}more lines of documentation@dots{}]}
256@end smallexample 285@end smallexample
257 286
258@noindent 287@noindent
259Each association in the list appears on four lines, with several 288In this case, each association in the list consists of two items, one
260editable fields and/or buttons. You can edit the regexps and coding 289labeled @samp{Parameter} and one labeled @samp{Value}; both are
261systems using ordinary editing commands. You can also invoke 290editable fields. You can delete an association from the list with the
262@samp{[Value Menu]} to switch to a different kind of value---for 291@samp{[DEL]} button next to it. To add an association, use the
263instance, to specify a function instead of a pair of coding systems. 292@samp{[INS]} button at the position where you want to insert it; the
264 293very last @samp{[INS]} button inserts at the end of the list.
265To delete an association from the list, invoke the @samp{[DEL]} button
266for that item. To add an association, invoke @samp{[INS]} at the
267position where you want to add it. There is an @samp{[INS]} button
268between each pair of associations, another at the beginning and another
269at the end, so you can add a new association at any position in the
270list.
271
272@kindex TAB @r{(customization buffer)}
273@kindex S-TAB @r{(customization buffer)}
274@findex widget-forward
275@findex widget-backward
276 Two special commands, @key{TAB} and @kbd{S-@key{TAB}}, are useful
277for moving through the customization buffer. @key{TAB}
278(@code{widget-forward}) moves forward to the next button or editable
279field; @kbd{S-@key{TAB}} (@code{widget-backward}) moves backward to
280the previous button or editable field.
281
282 Typing @key{RET} on an editable field also moves forward, just like
283@key{TAB}. You can thus type @key{RET} when you are finished editing
284a field, to move on to the next button or field. To insert a newline
285within an editable field, use @kbd{C-o} or @kbd{C-q C-j}.
286 294
287@cindex saving a setting 295@cindex saving a setting
288@cindex settings, how to save 296@cindex settings, how to save
289 Setting the variable changes its value in the current Emacs session; 297 When you set a variable, the new value takes effect only in the
290@dfn{saving} the value changes it for future sessions as well. To 298current Emacs session. To @dfn{save} the value for future sessions,
291save the variable, invoke @samp{[State]} and select the @samp{Save for 299use the @samp{[State]} button and select the @samp{Save for Future
292Future Sessions} operation. This works by writing code so as to set 300Sessions} operation. @xref{Saving Customizations}.
293the variable again, each time you start Emacs (@pxref{Saving
294Customizations}).
295 301
296 You can also restore the variable to its standard value by invoking 302 You can also restore the variable to its standard value by using the
297@samp{[State]} and selecting the @samp{Erase Customization} operation. 303@samp{[State]} button and selecting the @samp{Erase Customization}
298There are actually four reset operations: 304operation. There are actually four reset operations:
299 305
300@table @samp 306@table @samp
301@item Undo Edits 307@item Undo Edits
302If you have made some modifications and not yet set the variable, 308If you have modified but not yet set the variable, this restores the
303this restores the text in the customization buffer to match 309text in the customization buffer to match the actual value.
304the actual value.
305 310
306@item Reset to Saved 311@item Reset to Saved
307This restores the value of the variable to the last saved value, 312This restores the value of the variable to the last saved value,
308and updates the text accordingly. 313and updates the text accordingly.
309 314
310@item Erase Customization 315@item Erase Customization
311This sets the variable to its standard value, and updates the text 316This sets the variable to its standard value. Any saved value that
312accordingly. This also eliminates any saved value for the variable, 317you have is also eliminated.
313so that you will get the standard value in future Emacs sessions.
314 318
315@item Set to Backup Value 319@item Set to Backup Value
316This sets the variable to a previous value that was set in the 320This sets the variable to a previous value that was set in the
@@ -322,40 +326,51 @@ you can get the discarded value back again with this operation.
322@cindex comments on customized settings 326@cindex comments on customized settings
323 Sometimes it is useful to record a comment about a specific 327 Sometimes it is useful to record a comment about a specific
324customization. Use the @samp{Add Comment} item from the 328customization. Use the @samp{Add Comment} item from the
325@samp{[State]} menu to create a field for entering the comment. The 329@samp{[State]} menu to create a field for entering the comment.
326comment you enter will be saved, and displayed again if you again view
327the same variable in a customization buffer, even in another session.
328 330
329 The state of a group indicates whether anything in that group has been 331 Near the top of the customization buffer are two lines of buttons:
330edited, set or saved.
331
332 Near the top of the customization buffer there are two lines of buttons:
333 332
334@smallexample 333@smallexample
335 [Set for Current Session] [Save for Future Sessions] 334 [Set for Current Session] [Save for Future Sessions]
336 [Undo Edits] [Reset to Saved] [Erase Customization] [Finish] 335 [Undo Edits] [Reset to Saved] [Erase Customization] [Finish]
337@end smallexample 336@end smallexample
338 337
339@vindex custom-buffer-done-function
340@noindent 338@noindent
341Invoking @samp{[Finish]} either buries or kills this customization 339Each of the first five buttons performs the stated operation---set,
342buffer according to the setting of the option 340save, reset, etc.---on all the settings in the buffer that could
343@code{custom-buffer-done-kill}; the default is to bury the buffer. 341meaningfully be affected. They do not operate on settings that are
344Each of the other buttons performs an operation---set, save or 342hidden, nor on subgroups that are hidden or not visible in the buffer.
345reset---on each of the settings in the buffer that could meaningfully 343
346be set, saved or reset. They do not operate on settings whose values 344@kindex C-c C-c @r{(customization buffer)}
347are hidden, nor on subgroups which are hidden or not visible in the buffer. 345@kindex C-x C-c @r{(customization buffer)}
346@findex Custom-set
347@findex Custom-save
348 The command @kbd{C-c C-c} (@code{Custom-set}) is equivalent using to
349the @samp{[Set for Current Session]} button. The command @kbd{C-x
350C-s} (@code{Custom-save}) is like using the @samp{[Save for Future
351Sessions]} button.
352
353@vindex custom-buffer-done-kill
354 The @samp{[Finish]} button switches out of the customization buffer,
355and buries the buffer at the bottom of the buffer list. To make it
356kill the customization buffer instead, change the variable
357@code{custom-buffer-done-kill} to @code{t}.
348 358
349@node Saving Customizations 359@node Saving Customizations
350@subsection Saving Customizations 360@subsection Saving Customizations
351 361
352@vindex custom-file 362 In the customization buffer, you can @dfn{save} a customization
353 Saving customizations from the customization buffer works by writing 363setting by choosing the @samp{Save for Future Sessions} choice from
354code to a file. By reading this code, future sessions can set up the 364its @samp{[State]} button. The @kbd{C-x C-s} (@code{Custom-save})
355customizations again. Normally, the code is saved in your 365command, or the @samp{[Save for Future Sessions]} button at the top of
356initialization file (@pxref{Init File}). 366the customization buffer, saves all applicable settings in the buffer.
367
368 Saving works by writing code to a file, usually your initialization
369file (@pxref{Init File}). Future Emacs sessions automatically read
370this file at startup, which sets up the customizations again.
357 371
358 You can choose to save your customizations in a file other than your 372@vindex custom-file
373 You can choose to save customizations somewhere other than your
359initialization file. To make this work, you must add a couple of 374initialization file. To make this work, you must add a couple of
360lines of code to your initialization file, to set the variable 375lines of code to your initialization file, to set the variable
361@code{custom-file} to the name of the desired file, and to load that 376@code{custom-file} to the name of the desired file, and to load that
@@ -366,8 +381,8 @@ file. For example:
366(load custom-file) 381(load custom-file)
367@end example 382@end example
368 383
369 You can use @code{custom-file} to specify different customization 384 You can even specify different customization files for different
370files for different Emacs versions, like this: 385Emacs versions, like this:
371 386
372@example 387@example
373(cond ((< emacs-major-version 22) 388(cond ((< emacs-major-version 22)
@@ -393,80 +408,92 @@ customizations you might have on your initialization file.
393@node Face Customization 408@node Face Customization
394@subsection Customizing Faces 409@subsection Customizing Faces
395@cindex customizing faces 410@cindex customizing faces
396@cindex bold font 411@cindex faces, customizing
397@cindex italic font
398@cindex fonts and faces 412@cindex fonts and faces
399 413
400 In addition to variables, some customization groups also include 414 You can customize faces (@pxref{Faces}), which determine how Emacs
401faces. When you show the contents of a group, both the variables and 415displays different types of text. Customization groups can contain
402the faces in the group appear in the customization buffer. Here is an 416both variables and faces.
403example of how a face looks: 417
418 For example, in programming language modes, source code comments are
419shown with @code{font-lock-comment-face} (@pxref{Font Lock}). In a
420customization buffer, that face appears like this:
404 421
405@smallexample 422@smallexample
406Custom Changed Face:(sample) [Hide Face] 423[Hide] Font Lock Comment Face:[sample]
407 [State]: STANDARD. 424 [State] : STANDARD.
408Face used when the customize item has been changed. 425 Font Lock mode face used to highlight comments.
409Parent groups: [Custom Magic Faces] 426 [ ] Font Family: --
410Attributes: [ ] Font Family: * 427 [ ] Font Foundry: --
411 [ ] Width: * 428 [ ] Width: --
412 [ ] Height: * 429 [ ] Height: --
413 [ ] Weight: * 430 [ ] Weight: --
414 [ ] Slant: * 431 [ ] Slant: --
415 [ ] Underline: * 432 [ ] Underline: --
416 [ ] Overline: * 433 [ ] Overline: --
417 [ ] Strike-through: * 434 [ ] Strike-through: --
418 [ ] Box around text: * 435 [ ] Box around text: --
419 [ ] Inverse-video: * 436 [ ] Inverse-video: --
420 [X] Foreground: white (sample) 437 [X] Foreground: Firebrick [Choose] (sample)
421 [X] Background: blue (sample) 438 [ ] Background: --
422 [ ] Stipple: * 439 [ ] Stipple: --
423 [ ] Inherit: * 440 [ ] Inherit: --
441 [Hide Unused Attributes]
424@end smallexample 442@end smallexample
425 443
426 Each face attribute has its own line. The @samp{[@var{x}]} button 444@noindent
427before the attribute name indicates whether the attribute is 445The first three lines show the name, @samp{[State]} button, and
428@dfn{enabled}; @samp{[X]} means that it's enabled, and @samp{[ ]} 446documentation for the face. Below that is a list of @dfn{face
429means that it's disabled. You can enable or disable the attribute by 447attributes}. In front of each attribute is a checkbox. A filled
430clicking that button. When the attribute is enabled, you can change 448checkbox, @samp{[X]}, means that the face specifies a value for this
431the attribute value in the usual ways. 449attribute; an empty checkbox, @samp{[ ]}, means that the face does not
432 450specify any special value for the attribute. You can activate a
433 The foreground and background colors can be specified using color 451checkbox to specify or unspecify its attribute.
434names or RGB triplets. @xref{Colors}. 452
453 Most faces only specify a few attributes (in the above example,
454@code{font-lock-comment-face} only specifies the foreground color).
455Emacs has a special face, @code{default}, whose attributes are all
456specified; it determines the attributes left unspecified by other
457faces.
458
459 The @samp{Hide Unused Attributes} button, at the end of the
460attribute list, hides the unspecified attributes of the face. When
461attributes are being hidden, the button changes to @samp{[Show All
462Attributes]}, which reveals the entire attribute list. The
463customization buffer may start out with unspecified attributes hidden,
464to avoid cluttering the interface.
465
466 When an attribute is specified, you can change its value in the
467usual ways.
468
469 Foreground and background colors can be specified using either color
470names or RGB triplets (@pxref{Colors}). You can also use the
471@samp{[Choose]} button to switch to a list of color names; select a
472color with @key{RET} in that buffer to put the color name in the value
473field.
435 474
436 Setting, saving and resetting a face work like the same operations for 475 Setting, saving and resetting a face work like the same operations for
437variables (@pxref{Changing a Variable}). 476variables (@pxref{Changing a Variable}).
438 477
439 A face can specify different appearances for different types of 478 A face can specify different appearances for different types of
440display. For example, a face can make text red on a color display, but 479displays. For example, a face can make text red on a color display,
441use a bold font on a monochrome display. To specify multiple 480but use a bold font on a monochrome display. To specify multiple
442appearances for a face, select @samp{For All Kinds of Displays} in the 481appearances for a face, select @samp{For All Kinds of Displays} in the
443menu you get from invoking @samp{[State]}. 482menu you get from invoking @samp{[State]}.
444 483
445@findex modify-face
446 Another more basic way to set the attributes of a specific face is
447with @kbd{M-x modify-face}. This command reads the name of a face, then
448reads the attributes one by one. For the color and stipple attributes,
449the attribute's current value is the default---type just @key{RET} if
450you don't want to change that attribute. Type @samp{none} if you want
451to clear out the attribute.
452
453@node Specific Customization 484@node Specific Customization
454@subsection Customizing Specific Items 485@subsection Customizing Specific Items
455 486
456 Instead of finding the setting you want to change by navigating the
457structure of groups, here are other ways to specify the settings that
458you want to customize.
459
460@table @kbd 487@table @kbd
461@item M-x customize-option @key{RET} @var{option} @key{RET} 488@item M-x customize-option @key{RET} @var{option} @key{RET}
462Set up a customization buffer with just one user option variable, 489@itemx M-x customize-variable @key{RET} @var{option} @key{RET}
463@var{option}. 490Set up a customization buffer for just one user option, @var{option}.
464@item M-x customize-face @key{RET} @var{face} @key{RET} 491@item M-x customize-face @key{RET} @var{face} @key{RET}
465Set up a customization buffer with just one face, @var{face}. 492Set up a customization buffer for just one face, @var{face}.
466@item M-x customize-group @key{RET} @var{group} @key{RET} 493@item M-x customize-group @key{RET} @var{group} @key{RET}
467Set up a customization buffer with just one group, @var{group}. 494Set up a customization buffer for just one group, @var{group}.
468@item M-x customize-apropos @key{RET} @var{regexp} @key{RET} 495@item M-x customize-apropos @key{RET} @var{regexp} @key{RET}
469Set up a customization buffer with all the settings and groups that 496Set up a customization buffer for all the settings and groups that
470match @var{regexp}. 497match @var{regexp}.
471@item M-x customize-changed @key{RET} @var{version} @key{RET} 498@item M-x customize-changed @key{RET} @var{version} @key{RET}
472Set up a customization buffer with all the settings and groups 499Set up a customization buffer with all the settings and groups
@@ -480,35 +507,24 @@ set but not saved.
480@end table 507@end table
481 508
482@findex customize-option 509@findex customize-option
483 If you want to alter a particular user option with the customization 510 If you want to customize a particular user option, type @kbd{M-x
484buffer, and you know its name, you can use the command @kbd{M-x 511customize-option}. This reads the variable name, and sets up the
485customize-option} and specify the user option (variable) name. This 512customization buffer with just that one user option. When entering
486sets up the customization buffer with just one user option---the one 513the variable name into the minibuffer, completion is available, but
487that you asked for. Editing, setting and saving the value work as 514only for the names of variables that have been loaded into Emacs.
488described above, but only for the specified user option. Minibuffer
489completion is handy if you only know part of the name. However, this
490command can only see options that have been loaded in the current
491Emacs session.
492 515
493@findex customize-face 516@findex customize-face
494 Likewise, you can modify a specific face, chosen by name, using
495@kbd{M-x customize-face}. By default it operates on the face used
496on the character after point.
497
498@findex customize-group 517@findex customize-group
499 You can also set up the customization buffer with a specific group, 518 Likewise, you can customize a specific face using @kbd{M-x
500using @kbd{M-x customize-group}. The immediate contents of the chosen 519customize-face}. You can set up a customization buffer for a specific
501group, including settings (user options and faces), and other groups, 520customization group using @kbd{M-x customize-group}.
502all appear as well (even if not already loaded). However, the
503subgroups' own contents are not included.
504 521
505@findex customize-apropos 522@findex customize-apropos
506 For a more general way of controlling what to customize, you can use 523 @kbd{M-x customize-apropos} prompts for a search term---either one
507@kbd{M-x customize-apropos}. You specify a regular expression as 524or more words separated by spaces, or a regular expression---and sets
508argument; then all @emph{loaded} settings and groups whose names match 525up a customization buffer for all @emph{loaded} settings and groups
509this regular expression are set up in the customization buffer. If 526with matching names. This is like using the search field at the top
510you specify an empty regular expression, this includes @emph{all} 527of the customization buffer (@pxref{Customization Groups}).
511loaded groups and settings---which takes a long time to set up.
512 528
513@findex customize-changed 529@findex customize-changed
514 When you upgrade to a new Emacs version, you might want to consider 530 When you upgrade to a new Emacs version, you might want to consider
@@ -522,78 +538,159 @@ loading them if necessary.
522@findex customize-saved 538@findex customize-saved
523@findex customize-unsaved 539@findex customize-unsaved
524 If you change settings and then decide the change was a mistake, you 540 If you change settings and then decide the change was a mistake, you
525can use two special commands to revisit your previous changes. Use 541can use two commands to revisit your changes. Use @kbd{M-x
526@kbd{M-x customize-saved} to look at the settings that you have saved. 542customize-saved} to customize settings that you have saved. Use
527Use @kbd{M-x customize-unsaved} to look at the settings that you 543@kbd{M-x customize-unsaved} to customize settings that you have set
528have set but not saved. 544but not saved.
529 545
530@node Custom Themes 546@node Custom Themes
531@subsection Customization Themes 547@subsection Custom Themes
532@cindex custom themes 548@cindex custom themes
533 549
534 @dfn{Custom themes} are collections of settings that can be enabled 550 @dfn{Custom themes} are collections of settings that can be enabled
535or disabled as a unit. You can use Custom themes to switch quickly 551or disabled as a unit. You can use Custom themes to switch easily
536and easily between various collections of settings, and to transfer 552between various collections of settings, and to transfer such
537such collections from one computer to another. 553collections from one computer to another.
538 554
539@findex customize-create-theme 555 A Custom theme is stored an Emacs Lisp source file. If the name of
540 To define a Custom theme, use @kbd{M-x customize-create-theme}, 556the Custom theme is @var{name}, the theme file is named
541which brings up a buffer named @samp{*New Custom Theme*}. At the top 557@file{@var{name}-theme.el}. @xref{Creating Custom Themes}, for the
542of the buffer is an editable field where you can specify the name of 558format of a theme file and how to make one.
543the theme. Click on the button labeled @samp{Insert Variable} to add
544a variable to the theme, and click on @samp{Insert Face} to add a
545face. You can edit these values in the @samp{*New Custom Theme*}
546buffer like in an ordinary Customize buffer. To remove an option from
547the theme, click on its @samp{State} button and select @samp{Delete}.
548 559
560@findex customize-themes
549@vindex custom-theme-directory 561@vindex custom-theme-directory
550 After adding the desired options, click on @samp{Save Theme} to save 562@cindex color scheme
551the Custom theme. This writes the theme definition to a file 563 Type @kbd{M-x customize-themes} to switch to a buffer named
552@file{@var{foo}-theme.el} (where @var{foo} is the theme name you 564@samp{*Custom Themes*}, which lists the Custom themes that Emacs knows
553supplied), in the directory @file{~/.emacs.d/}. You can specify the 565about. By default, Emacs looks for theme files in two locations: the
554directory by setting @code{custom-theme-directory}. 566directory specified by the variable @code{custom-theme-directory}
555 567(which defaults to @file{~/.emacs.d/}), and a directory named
556 You can view and edit the settings of a previously-defined theme by 568@file{etc/themes} in your Emacs installation (see the variable
557clicking on @samp{Visit Theme} and specifying the theme name. You can 569@code{data-directory}). The latter contains several Custom themes
558also import the variables and faces that you have set using Customize 570which are distributed with Emacs, which customize Emacs' faces to fit
559by visiting the ``special'' theme named @samp{user}. This theme, which 571various color schemes. (Note, however, that Custom themes need not be
560records all the options that you set in the ordinary customization 572restricted to this purpose; they can be used to customize variables
561buffer, is always enabled, and always takes precedence over all other 573too).
562enabled Custom themes. Additionally, the @samp{user} theme is 574
563recorded with code in your @file{.emacs} file, rather than a 575@vindex custom-theme-load-path
564@file{user-theme.el} file. 576 If you want Emacs to look for Custom themes in some other directory,
577add the directory name to the list variable
578@code{custom-theme-load-path}. Its default value is
579@code{(custom-theme-directory t)}; here, the symbol
580@code{custom-theme-directory} has the special meaning of the value of
581the variable @code{custom-theme-directory}, while @code{t} stands for
582the built-in theme directory @file{etc/themes}. The themes listed in
583the @samp{*Custom Themes*} buffer are those found in the directories
584specified by @code{custom-theme-load-path}.
585
586@kindex C-x C-s @r{(Custom Themes buffer)}
587 In the @samp{*Custom Themes*} buffer, you can activate the checkbox
588next to a Custom theme to enable or disable the theme for the current
589Emacs session. When a Custom theme is enabled, all of its settings
590(variables and faces) take effect in the Emacs session. To apply the
591choice of theme(s) to future Emacs sessions, type @kbd{C-x C-s}
592(@code{custom-theme-save}) or use the @samp{[Save Theme Settings]}
593button.
594
595@vindex custom-safe-themes
596 When you first enable a Custom theme, Emacs displays the contents of
597the theme file and asks if you really want to load it. Because
598loading a Custom theme can execute arbitrary Lisp code, you should
599only say yes if you know that the theme is safe; in that case, Emacs
600offers to remember in the future that the theme is safe (this is done
601by saving the theme file's SHA1 hash to the variable
602@code{custom-safe-themes}; if you want to treat all themes as safe,
603change its value to @code{t}). Themes that come with Emacs (in the
604@file{etc/themes} directory) are exempt from this check, and are
605always considered safe.
565 606
566@vindex custom-enabled-themes 607@vindex custom-enabled-themes
567 Once you have defined a Custom theme, you can use it by customizing 608 Setting or saving Custom themes actually works by customizing the
568the variable @code{custom-enabled-themes}. This is a list of Custom 609variable @code{custom-enabled-themes}. The value of this variable is
569themes that are @dfn{enabled}, or put into effect. If you set 610a list of Custom theme names (as Lisp symbols, e.g.@: @code{tango}).
570@code{custom-enabled-themes} using the Customize interface, the theme 611Instead of using the @samp{*Custom Themes*} buffer to set
571definitions are automatically loaded from the theme files, if they 612@code{custom-enabled-themes}, you can customize the variable using the
572aren't already. If you save the value of @code{custom-enabled-themes} 613usual customization interface, e.g.@: with @kbd{M-x customize-option}.
573for future Emacs sessions, those Custom themes will be enabled 614Note that Custom themes are not allowed to set
574whenever Emacs is started up. 615@code{custom-enabled-themes} themselves.
575 616
576 If two enabled themes specify different values for an option, the 617 Any customizations that you make through the customization buffer
577theme occurring earlier in @code{custom-enabled-themes} takes effect. 618take precedence over theme settings. This lets you easily override
619individual theme settings that you disagree with. If settings from
620two different themes overlap, the theme occurring earlier in
621@code{custom-enabled-themes} takes precedence. In the customization
622buffer, if a setting has been changed from its default by a Custom
623theme, its @samp{State} display shows @samp{THEMED} instead of
624@samp{STANDARD}.
578 625
579@findex load-theme 626@findex load-theme
580@findex enable-theme 627@findex enable-theme
581@findex disable-theme 628@findex disable-theme
582 You can temporarily enable a Custom theme with @kbd{M-x 629 You can enable a specific Custom theme in the current Emacs session
583enable-theme}. This prompts for a theme name in the minibuffer, loads 630by typing @kbd{M-x load-theme}. This prompts for a theme name, loads
584the theme from the theme file if necessary, and enables the theme. 631the theme from the theme file, and enables the theme. If a theme file
585You can @dfn{disable} any enabled theme with the command @kbd{M-x 632has been loaded before, you can enable the theme without loading its
586disable-theme}; this returns the options specified in the theme to 633file by typing @kbd{M-x enable-theme}. To disable a Custom theme,
587their original values. To re-enable the theme, type @kbd{M-x 634type @kbd{M-x disable-theme}.
588enable-theme} again. If a theme file is changed during your Emacs 635
589session, you can reload it by typing @kbd{M-x load-theme}. (This also 636@findex describe-theme
590enables the theme.) 637 To see a description of a Custom theme, type @kbd{?} on its line in
638the @samp{*Custom Themes*} buffer; or type @kbd{M-x describe-theme}
639anywhere in Emacs and enter the theme name in the minibuffer.
640
641@node Creating Custom Themes
642@subsection Creating Custom Themes
643@cindex custom themes, creating
644
645@findex customize-create-theme
646 You can define a Custom theme using an interface similar to the
647customization buffer, by typing @kbd{M-x customize-create-theme}.
648This switches to a buffer named @samp{*Custom Theme*}. It also offers
649to insert some common Emacs faces into the theme (a convenience, since
650Custom themes are often used to customize faces). If you answer no,
651the theme will initially contain no settings.
652
653 Near the top of the @samp{*Custom Theme*} buffer are editable fields
654where you can enter the theme's name and description. The name can be
655anything except @samp{user}. The description is the one that will be
656shown when you invoke @kbd{M-x describe-theme} for the theme. Its
657first line should be a brief one-sentence summary; in the buffer made
658by @kbd{M-x customize-themes}, this sentence is displayed next to the
659theme name.
660
661 To add a new setting to the theme, use the @samp{[Insert Additional
662Face]} or @samp{[Insert Additional Variable]} buttons. Each button
663reads a face or variable name using the minibuffer, with completion,
664and inserts a customization entry for the face or variable. You can
665edit the variable values or face attributes in the same way as in a
666normal customization buffer. To remove a face or variable from the
667theme, uncheck the checkbox next to its name.
668
669@vindex custom-theme-directory
670 After specifying the Custom theme's faces and variables, type
671@kbd{C-x C-s} (@code{custom-theme-write}) or use the buffer's
672@samp{[Save Theme]} button. This saves the theme file, named
673@file{@var{name}-theme.el} where @var{name} is the theme name, in the
674directory named by @code{custom-theme-directory}.
675
676 From the @samp{*Custom Theme*} buffer, you can view and edit an
677existing Custom theme by activating the @samp{[Visit Theme]} button
678and specifying the theme name. You can also add the settings of
679another theme into the buffer, using the @samp{[Merge Theme]} button.
680You can import your non-theme settings into a Custom theme by using
681the @samp{[Merge Theme]} button and specifying the special theme named
682@samp{user}.
683
684 A theme file is simply an Emacs Lisp source file, and loading the
685Custom theme works by loading the Lisp file. Therefore, you can edit
686a theme file directly instead of using the @samp{*Custom Theme*}
687buffer.
688@c Add link to the relevant Emacs Lisp Reference manual node, once
689@c that is written.
591 690
592@node Variables 691@node Variables
593@section Variables 692@section Variables
594@cindex variable 693@cindex variable
595@cindex option, user
596@cindex user option
597 694
598 A @dfn{variable} is a Lisp symbol which has a value. The symbol's 695 A @dfn{variable} is a Lisp symbol which has a value. The symbol's
599name is also called the @dfn{variable name}. A variable name can 696name is also called the @dfn{variable name}. A variable name can
@@ -609,10 +706,10 @@ using the help command @kbd{C-h v} (@code{describe-variable}).
609 706
610 Emacs uses many Lisp variables for internal record keeping, but the 707 Emacs uses many Lisp variables for internal record keeping, but the
611most interesting variables for a non-programmer user are those meant 708most interesting variables for a non-programmer user are those meant
612for users to change---these are called @dfn{user options}. @xref{Easy 709for users to change---these are called @dfn{customizable variables} or
613Customization}, for information about using the Customize facility to 710@dfn{user options} (@pxref{Easy Customization}). In the following
614set user options. In the following sections, we will describe other 711sections, we will describe other aspects of Emacs variables, such as
615aspects of Emacs variables, such as how to set them outside Customize. 712how to set them outside Customize.
616 713
617 Emacs Lisp allows any variable (with a few exceptions) to have any 714 Emacs Lisp allows any variable (with a few exceptions) to have any
618kind of value. However, many variables are meaningful only if 715kind of value. However, many variables are meaningful only if
@@ -654,9 +751,9 @@ Display the value and documentation of variable @var{var}
654Change the value of variable @var{var} to @var{value}. 751Change the value of variable @var{var} to @var{value}.
655@end table 752@end table
656 753
657 To examine the value of a single variable, use @kbd{C-h v} 754 To examine the value of a variable, use @kbd{C-h v}
658(@code{describe-variable}), which reads a variable name using the 755(@code{describe-variable}). This reads a variable name using the
659minibuffer, with completion. It displays both the value and the 756minibuffer, with completion, and displays both the value and the
660documentation of the variable. For example, 757documentation of the variable. For example,
661 758
662@example 759@example
@@ -686,10 +783,10 @@ You can customize this variable.
686@noindent 783@noindent
687The line that says ``You can customize the variable'' indicates that 784The line that says ``You can customize the variable'' indicates that
688this variable is a user option. @kbd{C-h v} is not restricted to user 785this variable is a user option. @kbd{C-h v} is not restricted to user
689options; it allows any variable name. 786options; it allows non-customizable variables too.
690 787
691@findex set-variable 788@findex set-variable
692 The most convenient way to set a specific user option variable is 789 The most convenient way to set a specific customizable variable is
693with @kbd{M-x set-variable}. This reads the variable name with the 790with @kbd{M-x set-variable}. This reads the variable name with the
694minibuffer (with completion), and then reads a Lisp expression for the 791minibuffer (with completion), and then reads a Lisp expression for the
695new value using the minibuffer a second time (you can insert the old 792new value using the minibuffer a second time (you can insert the old
@@ -702,22 +799,23 @@ M-x set-variable @key{RET} fill-column @key{RET} 75 @key{RET}
702@noindent 799@noindent
703sets @code{fill-column} to 75. 800sets @code{fill-column} to 75.
704 801
705 @kbd{M-x set-variable} is limited to user option variables, but you can 802 @kbd{M-x set-variable} is limited to customizable variables, but you
706set any variable with a Lisp expression, using the function @code{setq}. 803can set any variable with a Lisp expression like this:
707Here is a @code{setq} expression to set @code{fill-column}:
708 804
709@example 805@example
710(setq fill-column 75) 806(setq fill-column 75)
711@end example 807@end example
712 808
713 To execute an expression like this one, go to the @samp{*scratch*} 809@noindent
714buffer, type in the expression, and then type @kbd{C-j}. @xref{Lisp 810To execute such an expression, type @kbd{M-:} (@code{eval-expression})
715Interaction}. 811and enter the expression in the minibuffer (@pxref{Lisp Eval}).
812Alternatively, go to the @samp{*scratch*} buffer, type in the
813expression, and then type @kbd{C-j} (@pxref{Lisp Interaction}).
716 814
717 Setting variables, like all means of customizing Emacs except where 815 Setting variables, like all means of customizing Emacs except where
718otherwise stated, affects only the current Emacs session. The only 816otherwise stated, affects only the current Emacs session. The only
719way to alter the variable in future sessions is to put something in 817way to alter the variable in future sessions is to put something in
720your initialization file to set it those sessions (@pxref{Init File}). 818your initialization file (@pxref{Init File}).
721 819
722@node Hooks 820@node Hooks
723@subsection Hooks 821@subsection Hooks
@@ -792,8 +890,8 @@ Reference Manual}).
792@cindex program editing 890@cindex program editing
793 Major mode hooks also apply to other major modes @dfn{derived} from 891 Major mode hooks also apply to other major modes @dfn{derived} from
794the original mode (@pxref{Derived Modes,,, elisp, The Emacs Lisp 892the original mode (@pxref{Derived Modes,,, elisp, The Emacs Lisp
795Reference Manual}). For instance, HTML mode (@pxref{HTML Mode}) 893Reference Manual}). For instance, HTML mode is derived from Text mode
796inherits from Text mode; when HTML mode is enabled, it runs 894(@pxref{HTML Mode}); when HTML mode is enabled, it runs
797@code{text-mode-hook} before running @code{html-mode-hook}. This 895@code{text-mode-hook} before running @code{html-mode-hook}. This
798provides a convenient way to use a single hook to affect several 896provides a convenient way to use a single hook to affect several
799related modes. In particular, if you want to apply a hook function to 897related modes. In particular, if you want to apply a hook function to
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 080f8a6957f..9ab0dc1870e 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -1033,15 +1033,14 @@ Customization
1033 1033
1034Easy Customization Interface 1034Easy Customization Interface
1035 1035
1036* Customization Groups:: How settings are classified in a structure. 1036* Customization Groups:: How settings are classified.
1037* Browsing Custom:: Browsing and searching for settings. 1037* Browsing Custom:: Browsing and searching for settings.
1038* Changing a Variable:: How to edit an option's value and set the option. 1038* Changing a Variable:: How to edit an option's value and set the option.
1039* Saving Customizations:: Specifying the file for saving customizations. 1039* Saving Customizations:: Saving customizations for future Emacs sessions.
1040* Face Customization:: How to edit the attributes of a face. 1040* Face Customization:: How to edit the attributes of a face.
1041* Specific Customization:: Making a customization buffer for specific 1041* Specific Customization:: Customizing specific settings or groups.
1042 variables, faces, or groups. 1042* Custom Themes:: Collections of customization settings.
1043* Custom Themes:: How to define collections of customized options 1043* Creating Custom Themes:: How to create a new custom theme.
1044 that can be loaded and unloaded together.
1045 1044
1046Variables 1045Variables
1047 1046
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi
index bf4119b4878..7e2aa20d52e 100644
--- a/doc/emacs/package.texi
+++ b/doc/emacs/package.texi
@@ -20,7 +20,7 @@ via this buffer. @xref{Package Menu}.
20 20
21@findex describe-package 21@findex describe-package
22 The command @kbd{C-h P} (@code{describe-package}) prompts for the 22 The command @kbd{C-h P} (@code{describe-package}) prompts for the
23name of a package, and displays a help buffer describing that 23name of a package, and displays a help buffer describing the
24attributes of the package and the features that it implements. 24attributes of the package and the features that it implements.
25 25
26 By default, Emacs downloads packages from a @dfn{package archive} 26 By default, Emacs downloads packages from a @dfn{package archive}
@@ -119,9 +119,9 @@ dependencies; also, delete all packages marked with @kbd{d}
119(@code{package-menu-execute}). This also removes the marks. 119(@code{package-menu-execute}). This also removes the marks.
120 120
121@item r 121@item r
122Refresh the package list (@code{package-menu-refresh}). This also 122Refresh the package list (@code{package-menu-refresh}). This fetches
123retrieves the list of available packages from the package archive 123the list of available packages from the package archive again, and
124again. 124recomputes the package list.
125@end table 125@end table
126 126
127@noindent 127@noindent
diff --git a/etc/NEWS b/etc/NEWS
index 2676c544c2f..77447df04f6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -341,14 +341,14 @@ automatically when Emacs starts up. To disable this, set
341loaded, customize `package-load-list'. 341loaded, customize `package-load-list'.
342 342
343** Custom Themes 343** Custom Themes
344 344+++
345*** `M-x customize-themes' lists Custom themes which can be enabled. 345*** `M-x customize-themes' lists Custom themes which can be enabled.
346 346+++
347*** New option `custom-theme-load-path' is the load path for themes. 347*** New option `custom-theme-load-path' is the load path for themes.
348Emacs no longer looks for custom themes in `load-path'. The default 348Emacs no longer looks for custom themes in `load-path'. The default
349is to search in `custom-theme-directory', followed by a built-in theme 349is to search in `custom-theme-directory', followed by a built-in theme
350directory named "themes/" in `data-directory'. 350directory named "themes/" in `data-directory'.
351 351+++
352*** New option `custom-safe-themes' records known-safe theme files. 352*** New option `custom-safe-themes' records known-safe theme files.
353If a theme is not in this list, Emacs queries before loading it, and 353If a theme is not in this list, Emacs queries before loading it, and
354offers to save the theme to `custom-safe-themes' automatically. By 354offers to save the theme to `custom-safe-themes' automatically. By
@@ -640,15 +640,18 @@ in the *compilation* buffer was used.
640 640
641** Customize 641** Customize
642 642
643+++
643*** Customize buffers now contain a search field. 644*** Customize buffers now contain a search field.
644The search is performed using `customize-apropos'. 645The search is performed using `customize-apropos'.
645To turn off the search field, set custom-search-field to nil. 646To turn off the search field, set custom-search-field to nil.
646 647
648+++
647*** Custom options now start out hidden if at their default values. 649*** Custom options now start out hidden if at their default values.
648Use the arrow to the left of the option name to toggle visibility. 650Use the arrow to the left of the option name to toggle visibility.
649 651
650*** custom-buffer-sort-alphabetically now defaults to t. 652*** custom-buffer-sort-alphabetically now defaults to t.
651 653
654+++
652*** The color widget now has a "Choose" button, which allows you to 655*** The color widget now has a "Choose" button, which allows you to
653choose a color via list-colors-display. 656choose a color via list-colors-display.
654 657