(quoted-printable-encode-region): Use mm-insert-byte.
[bpt/emacs.git] / man / custom.texi
index f183580..5022162 100644 (file)
@@ -1,5 +1,5 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985,86,87,93,94,95,97,2000,2001
+@c Copyright (C) 1985,86,87,93,94,95,97,2000,2001,2002
 @c  Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Customization, Quitting, Amusements, Top
@@ -300,6 +300,7 @@ active fields and other features.
 * Groups: Customization Groups.
                              How options are classified in a structure.
 * Changing an Option::       How to edit a value and set an option.
+* Saving Customizations::    Details of saving customizations.
 * Face Customization::       How to edit the attributes of a face.
 * Specific Customization::   Making a customization buffer for specific
                                 options, faces, or groups.
@@ -517,21 +518,15 @@ editable field, use @kbd{C-o} or @kbd{C-q C-j}.
 @cindex saving option value
 @cindex customized options, saving
   Setting the option changes its value in the current Emacs session;
-@dfn{saving} the value changes it for future sessions as well.  This
-works by writing code into your @file{~/.emacs} file so as to set the
-option variable again each time you start Emacs.  To save the option,
-invoke @samp{[State]} and select the @samp{Save for Future Sessions}
-operation.
-
-  If Emacs was invoked with the @option{-q} or @option{--no-init-file}
-options (@pxref{Initial Options}), it will not let you save your
-customizations in your @file{~/.emacs} init file.  This is because
-saving customizations from such a session would wipe out all the other
-customizations you might have on your init file.
+@dfn{saving} the value changes it for future sessions as well.  To
+save the option, invoke @samp{[State]} and select the @samp{Save for
+Future Sessions} operation.  This works by writing code so as to set
+the option variable again each time you start Emacs (@pxref{Saving
+Customizations}).
 
   You can also restore the option to its standard value by invoking
-@samp{[State]} and selecting the @samp{Erase Customization}
-operation.  There are actually three reset operations:
+@samp{[State]} and selecting the @samp{Erase Customization} operation.
+There are actually three reset operations:
 
 @table @samp
 @item Reset
@@ -547,6 +542,12 @@ and updates the text accordingly.
 This sets the option to its standard value, and updates the text
 accordingly.  This also eliminates any saved value for the option,
 so that you will get the standard value in future Emacs sessions.
+
+@item Use Backup Value
+This sets the option to a previous value that was set in the
+customization buffer in this session.  If you customize a variable
+and then reset the variable, which discards the customized value,
+you can get the customized value back again with this operation.
 @end table
 
 @cindex comments on customized options
@@ -579,6 +580,38 @@ Each of the other fields performs an operation---set, save or
 reset---on each of the items in the buffer that could meaningfully be
 set, saved or reset.
 
+@node Saving Customizations
+@subsubsection Saving Customizations
+
+@vindex custom-file
+  The customization buffer normally saves customizations in
+@file{~/.emacs}.  If you wish, you can save customizations in another
+file instead.  To make this work, your @file{~/.emacs} should set
+@code{custom-file} to the name of that file.  Emacs loads the file
+right after your @file{.emacs} if you did not load it already.  For
+example:
+
+@example
+(setq custom-file "~/.emacs-custom")
+@end example
+
+  The variable @code{custom-file} is useful if you want to have
+different customizations for different Emacs versions:
+
+@example
+(if (< emacs-major-version 21)
+    ;; @r{Emacs 20 customization.}
+    (setq custom-file "~/.custom-20.el")
+  ;; @r{Emacs 21 customization.}
+  (setq custom-file "~/.custom-21.el"))
+@end example
+
+  If Emacs was invoked with the @option{-q} or @option{--no-init-file}
+options (@pxref{Initial Options}), it will not let you save your
+customizations in your @file{~/.emacs} init file.  This is because
+saving customizations from such a session would wipe out all the other
+customizations you might have on your init file.
+
 @node Face Customization
 @subsubsection Customizing Faces
 @cindex customizing faces
@@ -592,23 +625,24 @@ the faces in the group appear in the customization buffer.  Here is an
 example of how a face looks:
 
 @smallexample
-Custom Changed Face: (sample) [Hide]
+Custom Changed Face:(sample) [Hide]
    [State]: this face is unchanged from its standard setting.
-Parent groups: [Custom Magic Faces]
-Attributes: [ ] Font family: [Value Menu] *
-            [ ] Width: [Value Menu] *
-            [ ] Height: [Value Menu] *
-            [ ] Weight: [Value Menu] *
-            [ ] Slant: [Value Menu] *
-            [ ] Underline: [Value Menu] *
-            [ ] Overline: [Value Menu] *
-            [ ] Strike-through: [Value Menu] *
-            [ ] Box around text: [Value Menu] *
-            [ ] Inverse-video: [Value Menu] *
-            [X] Foreground: [Value Menu] Color: white       (sample)
-            [X] Background: [Value Menu] Color: blue        (sample)
-            [ ] Stipple: [Value Menu] *
-            [ ] Inherit:
+Face used when the customize item has been changed.
+Parent groups: => Custom Magic Faces
+Attributes: [ ] Font Family: *
+            [ ] Width: *
+            [ ] Height: *
+            [ ] Weight: *
+            [ ] Slant: *
+            [ ] Underline: *
+            [ ] Overline: *
+            [ ] Strike-through: *
+            [ ] Box around text: *
+            [ ] Inverse-video: *
+            [X] Foreground: white       (sample)
+            [X] Background: blue        (sample)
+            [ ] Stipple: *
+            [ ] Inherit: *
 @end smallexample
 
   Each face attribute has its own line.  The @samp{[@var{x}]} field
@@ -677,7 +711,8 @@ only for the specified option.
 
 @findex customize-face
   Likewise, you can modify a specific face, chosen by name, using
-@kbd{M-x customize-face}.
+@kbd{M-x customize-face}.  By default it operates on the face used
+on the character after point.
 
 @findex customize-group
   You can also set up the customization buffer with a specific group,
@@ -743,7 +778,7 @@ in @samp{-hooks} or @samp{-functions}, instead of @samp{-hook}.  What
 makes these hooks abnormal is that there is something peculiar about the
 way its functions are called---perhaps they are given arguments, or
 perhaps the values they return are used in some way.  For example,
-@code{find-file-not-found-hooks} (@pxref{Visiting}) is abnormal because
+@code{find-file-not-found-functions} (@pxref{Visiting}) is abnormal because
 as soon as one hook function returns a non-@code{nil} value, the rest
 are not called at all.  The documentation of each abnormal hook variable
 explains in detail what is peculiar about it.
@@ -1348,12 +1383,12 @@ events with keyboard events, but we recommend against it, because such
 key sequences are inconvenient to use.
 
   As a user, you can redefine any key; but it is usually best to stick
-to key sequences that consist of @kbd{C-c} followed by a letter.
-These keys are ``reserved for users,'' so they won't conflict with any
-properly designed Emacs extension.  The function keys @key{F5} through
-@key{F9} are also reserved for users.  If you redefine some other key,
-your definition may be overridden by certain extensions or major modes
-which redefine the same key.
+to key sequences that consist of @kbd{C-c} followed by a letter (upper
+or lower case).  These keys are ``reserved for users,'' so they won't
+conflict with any properly designed Emacs extension.  The function
+keys @key{F5} through @key{F9} are also reserved for users.  If you
+redefine some other key, your definition may be overridden by certain
+extensions or major modes which redefine the same key.
 
 @node Prefix Keymaps
 @subsection Prefix Keymaps
@@ -2002,6 +2037,12 @@ file directly or with the command @kbd{M-x disable-command}, which edits
 the @file{.emacs} file for you.  Likewise, @kbd{M-x enable-command}
 edits @file{.emacs} to enable a command permanently.  @xref{Init File}.
 
+  If Emacs was invoked with the @option{-q} or @option{--no-init-file}
+options (@pxref{Initial Options}), it will not edit your
+@file{~/.emacs} init file.  This is because editing the init file from
+such a session might overwrite the lines you might have on your init
+file which enable and disable commands.
+
   Whether a command is disabled is independent of what key is used to
 invoke it; disabling also applies if the command is invoked using
 @kbd{M-x}.  Disabling a command has no effect on calling it as a