]> code.delx.au - gnu-emacs/blobdiff - man/custom.texi
(setfilename): Go up one more level to ../../info.
[gnu-emacs] / man / custom.texi
index 8c414e6393c4b1ac8c4c22fe25c700c2668cc0ec..d496ab84b190ea0468e84cf865806b8535643720 100644 (file)
@@ -1,13 +1,13 @@
 @c This is part of the Emacs manual.
 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
-@c   2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@c   2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Customization, Quitting, Amusements, Top
 @chapter Customization
 @cindex customization
 
   This chapter talks about various topics relevant to adapting the
-behavior of Emacs in minor ways.
+behavior of Emacs in ways we have anticipated.
 @iftex
 See @cite{The Emacs Lisp Reference Manual}
 @end iftex
@@ -15,14 +15,14 @@ See @cite{The Emacs Lisp Reference Manual}
 @xref{Top, Emacs Lisp, Emacs Lisp, elisp, The Emacs Lisp
 Reference Manual},
 @end ifnottex
-for how to make more far-reaching changes.  @xref{X Resources},
-for information on using X resources to customize Emacs.
+for how to make more far-reaching and open-ended changes.  @xref{X
+Resources}, for information on using X resources to customize Emacs.
 
   Customization that you do within Emacs normally affects only the
 particular Emacs session that you do it in---it does not persist
 between sessions unless you save the customization in a file such as
-@file{.emacs} or @file{.Xdefaults} that will affect future sessions.
-@xref{Init File}.  In the customization buffer, when you save
+your init file (@file{.emacs}) that will affect future sessions.
+(@xref{Init File}.)  When you tell the customization buffer to save
 customizations for future sessions, this actually works by editing
 @file{.emacs} for you.
 
@@ -55,17 +55,19 @@ replay sequences of keys.
 example, Auto Fill mode is a minor mode in which @key{SPC} breaks lines
 between words as you type.  All the minor modes are independent of each
 other and of the selected major mode.  Most minor modes say in the mode
-line when they are on; for example, @samp{Fill} in the mode line means
-that Auto Fill mode is on.
-
-  Append @code{-mode} to the name of a minor mode to get the name of a
-command that turns the mode on or off.  Thus, the command to
-enable or disable Auto Fill mode is called @code{auto-fill-mode}.  These
-commands are usually invoked with @kbd{M-x}, but you can bind keys to them
-if you wish.  With no argument, the function turns the mode on if it was
-off and off if it was on.  This is known as @dfn{toggling}.  A positive
-argument always turns the mode on, and an explicit zero argument or a
-negative argument always turns it off.
+line when they are enabled; for example, @samp{Fill} in the mode line means
+that Auto Fill mode is enabled.
+
+  You should append @code{-mode} to the name of a minor mode to
+produce the name of the command that turns the mode on or off.  Thus,
+the command to enable or disable Auto Fill mode is called
+@code{auto-fill-mode}.  These commands are usually invoked with
+@kbd{M-x}, but you can bind keys to them if you wish.
+
+  With no argument, the minor mode function turns the mode on if it
+was off, and off if it was on.  This is known as @dfn{toggling}.  A
+positive argument always turns the mode on, and an explicit zero
+argument or a negative argument always turns it off.
 
   Some minor modes are global: while enabled, they affect everything
 you do in the Emacs session, in all buffers.  Other minor modes are
@@ -94,8 +96,8 @@ a matter of user preference---other users editing the same file might
 not want the same minor modes you prefer.
 
   The most useful buffer-local minor modes include Abbrev mode, Auto
-Fill mode, Auto Save mode, Font-Lock mode, Glasses mode, ISO Accents
-mode, Outline minor mode, Overwrite mode, and Binary Overwrite mode.
+Fill mode, Auto Save mode, Font-Lock mode, Glasses mode, Outline minor
+mode, Overwrite mode, and Binary Overwrite mode.
 
   Abbrev mode allows you to define abbreviations that automatically expand
 as you type them.  For example, @samp{amd} might expand to @samp{abbrev
@@ -105,9 +107,8 @@ mode}.  @xref{Abbrevs}, for full information.
 explicitly.  Emacs inserts newlines as necessary to prevent lines from
 becoming too long.  @xref{Filling}.
 
-  Auto Save mode causes the contents of a buffer to be saved
-periodically to reduce the amount of work you can lose in case of a
-system crash.  @xref{Auto Save}.
+  Auto Save mode saves the buffer contents periodically to reduce the
+amount of work you can lose in case of a crash.  @xref{Auto Save}.
 
   Enriched mode enables editing and saving of formatted text.
 @xref{Formatted Text}.
@@ -115,16 +116,18 @@ system crash.  @xref{Auto Save}.
   Flyspell mode automatically highlights misspelled words.
 @xref{Spelling}.
 
-  Font-Lock mode automatically highlights certain textual units found in
-programs, such as comments, strings, and function names being defined.
-This requires a graphical display that can show multiple fonts.
-@xref{Faces}.
+  Font-Lock mode automatically highlights certain textual units found
+in programs, such as comments, strings, and function names being
+defined.  This requires a display that can show multiple fonts or
+colors.  @xref{Faces}.
 
+@ignore
   ISO Accents mode makes the characters @samp{`}, @samp{'}, @samp{"},
 @samp{^}, @samp{/} and @samp{~} combine with the following letter, to
 produce an accented letter in the ISO Latin-1 character set.  The
 newer and more general feature of input methods more or less
 supersedes ISO Accents mode.  @xref{Unibyte Mode}.
+@end ignore
 
   Outline minor mode provides the same facilities as the major mode
 called Outline mode; but since it is a minor mode instead, you can
@@ -228,7 +231,11 @@ the way up to a master group called @code{Emacs}.
 top-level @code{Emacs} group and the second-level groups immediately
 under it.  It looks like this, in part:
 
+@c we want the buffer example to all be on one page, but unfortunately
+@c that's quite a bit of text, so force all space to the bottom.
+@page
 @smallexample
+@group
 /- Emacs group: ---------------------------------------------------\
       [State]: visible group members are all at standard values.
    Customization of the One True Editor.
@@ -243,7 +250,7 @@ Interfacing to external utilities.
 @var{more second-level groups}
 
 \- Emacs group end ------------------------------------------------/
-
+@end group
 @end smallexample
 
 @noindent
@@ -286,15 +293,15 @@ settings.  This command creates a special customization buffer which
 shows only the names of groups and settings, and puts them in a
 structure.
 
-  In this buffer, you can show the contents of a group by invoking
-@samp{[+]}.  When the group contents are visible, this button changes to
-@samp{[-]}; invoking that hides the group contents.
+  In this buffer, you can show the contents of a group by invoking the
+@samp{[+]} button.  When the group contents are visible, this button
+changes to @samp{[-]}; invoking that hides the group contents again.
 
-  Each setting in this buffer has a link which says @samp{[Group]},
-@samp{[Option]} or @samp{[Face]}.  Invoking this link creates an
-ordinary customization buffer showing just that group and its
-contents, just that user option, or just that face.  This is the way
-to change settings that you find with @kbd{M-x customize-browse}.
+  Each group or setting in this buffer has a link which says
+@samp{[Group]}, @samp{[Option]} or @samp{[Face]}.  Invoking this link
+creates an ordinary customization buffer showing just that group and
+its contents, just that user option, or just that face.  This is the
+way to change settings that you find with @kbd{M-x customize-browse}.
 
   If you can guess part of the name of the settings you are interested
 in, @kbd{M-x customize-apropos} is another way to search for settings.
@@ -343,6 +350,8 @@ value:
                                                            save it.
 @end smallexample
 
+@cindex user options, how to set
+@cindex variables, how to set
 @cindex settings, how to set
   Editing the value does not actually set the variable.  To do that,
 you must @dfn{set} the variable.  To do this, invoke the
@@ -415,8 +424,8 @@ instance, to specify a function instead of a pair of coding systems.
 To delete an association from the list, invoke the @samp{[DEL]} button
 for that item.  To add an association, invoke @samp{[INS]} at the
 position where you want to add it.  There is an @samp{[INS]} button
-between each pair of association, another at the beginning and another
-at the end, so you can add the new association at any position in the
+between each pair of associations, another at the beginning and another
+at the end, so you can add a new association at any position in the
 list.
 
 @kindex TAB @r{(customization buffer)}
@@ -466,10 +475,10 @@ so that you will get the standard value in future Emacs sessions.
 This sets the variable to a previous value that was set in the
 customization buffer in this session.  If you customize a variable
 and then reset it, which discards the customized value,
-you can get the customized value back again with this operation.
+you can get the discarded value back again with this operation.
 @end table
 
-@cindex comments on customized options
+@cindex comments on customized settings
   Sometimes it is useful to record a comment about a specific
 customization.  Use the @samp{Add Comment} item from the
 @samp{[State]} menu to create a field for entering the comment.  The
@@ -494,13 +503,17 @@ buffer according to the setting of the option
 Each of the other buttons performs an operation---set, save or
 reset---on each of the settings in the buffer that could meaningfully
 be set, saved or reset.  They do not operate on settings whose values
-are hidden, nor on subgroups not visible in the buffer.
+are hidden, nor on subgroups which are hidden or not visible in the buffer.
 
 @node Saving Customizations
 @subsection Saving Customizations
 
+  Saving customizations from the customization buffer works by writing
+code that future sessions will read, code to set up those
+customizations again.
+
 @vindex custom-file
-  The customization buffer normally saves customizations in
+  Normally this saves customizations in your init file,
 @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.  Then you should load the
@@ -511,8 +524,8 @@ file by calling @code{load}.  For example:
 (load custom-file)
 @end example
 
-  You can also use @code{custom-file} to specify different
-customization files for different Emacs versions, like this:
+  You can use @code{custom-file} to specify different customization
+files for different Emacs versions, like this:
 
 @example
 (cond ((< emacs-major-version 21)
@@ -612,8 +625,9 @@ structure of groups, here are other ways to specify the settings that
 you want to customize.
 
 @table @kbd
-@item M-x customize-variable @key{RET} @var{variable} @key{RET}
-Set up a customization buffer with just one variable, @var{variable}.
+@item M-x customize-option @key{RET} @var{option} @key{RET}
+Set up a customization buffer with just one user option variable,
+@var{option}.
 @item M-x customize-face @key{RET} @var{face} @key{RET}
 Set up a customization buffer with just one face, @var{face}.
 @item M-x customize-group @key{RET} @var{group} @key{RET}
@@ -621,26 +635,27 @@ Set up a customization buffer with just one group, @var{group}.
 @item M-x customize-apropos @key{RET} @var{regexp} @key{RET}
 Set up a customization buffer with all the settings and groups that
 match @var{regexp}.
-@item M-x customize-changed-options @key{RET} @var{version} @key{RET}
+@item M-x customize-changed @key{RET} @var{version} @key{RET}
 Set up a customization buffer with all the settings and groups
 whose meaning has changed since Emacs version @var{version}.
 @item M-x customize-saved
 Set up a customization buffer containing all settings that you
 have saved with customization buffers.
-@item M-x customize-customized
+@item M-x customize-unsaved
 Set up a customization buffer containing all settings that you have
-customized but not saved.
+set but not saved.
 @end table
 
-@findex customize-variable
-  If you want to alter a particular variable with the customization
+@findex customize-option
+  If you want to alter a particular user option with the customization
 buffer, and you know its name, you can use the command @kbd{M-x
-customize-variable} and specify the variable name.  This sets up the
-customization buffer with just one variable---the one that you asked
-for.  Editing, setting and saving the value work as described above,
-but only for the specified variable.  Minibuffer completion is handy
-if you only know part of the name.  However, this command can only see
-options that have been loaded in the current Emacs session.
+customize-option} and specify the user option (variable) name.  This
+sets up the customization buffer with just one user option---the one
+that you asked for.  Editing, setting and saving the value work as
+described above, but only for the specified user option.  Minibuffer
+completion is handy if you only know part of the name.  However, this
+command can only see options that have been loaded in the current
+Emacs session.
 
 @findex customize-face
   Likewise, you can modify a specific face, chosen by name, using
@@ -650,33 +665,33 @@ on the character after point.
 @findex customize-group
   You can also set up the customization buffer with a specific group,
 using @kbd{M-x customize-group}.  The immediate contents of the chosen
-group, including variables, faces, and other groups, all appear
-as well (even if not already loaded).  However, the subgroups' own
-contents are not included.
+group, including settings (user options and faces), and other groups,
+all appear as well (even if not already loaded).  However, the
+subgroups' own contents are not included.
 
 @findex customize-apropos
-  To control more precisely what to customize, you can use @kbd{M-x
-customize-apropos}.  You specify a regular expression as argument;
-then all @emph{loaded} settings and groups whose names match this
-regular expression are set up in the customization buffer.  If you
-specify an empty regular expression, this includes @emph{all} loaded
-groups and settings---which takes a long time to set up.
+  For a more general way of controlling what to customize, you can use
+@kbd{M-x customize-apropos}.  You specify a regular expression as
+argument; then all @emph{loaded} settings and groups whose names match
+this regular expression are set up in the customization buffer.  If
+you specify an empty regular expression, this includes @emph{all}
+loaded groups and settings---which takes a long time to set up.
 
 @findex customize-changed
-  When you upgrade to a new Emacs version, you might want to customize
-new settings and settings whose meanings or default values have
-changed.  To do this, use @kbd{M-x customize-changed} and
+  When you upgrade to a new Emacs version, you might want to consider
+customizing new settings, and settings whose meanings or default
+values have changed.  To do this, use @kbd{M-x customize-changed} and
 specify a previous Emacs version number using the minibuffer.  It
 creates a customization buffer which shows all the settings and groups
-whose definitions have been changed since the specified version, loading
-them if necessary.
+whose definitions have been changed since the specified version,
+loading them if necessary.
 
 @findex customize-saved
-@findex customize-customized
+@findex customize-unsaved
   If you change settings and then decide the change was a mistake, you
 can use two special commands to revisit your previous changes.  Use
 @kbd{M-x customize-saved} to look at the settings that you have saved.
-Use @kbd{M-x customize-customized} to look at the settings that you
+Use @kbd{M-x customize-unsaved} to look at the settings that you
 have set but not saved.
 
 @node Custom Themes
@@ -712,7 +727,7 @@ by visiting the ``special'' theme named @samp{user}.  This theme, which
 records all the options that you set in the ordinary customization
 buffer, is always enabled, and always takes precedence over all other
 enabled Custom themes.  Additionally, the @samp{user} theme is
-recorded in your @file{.emacs} file, rather than a
+recorded with code in your @file{.emacs} file, rather than a
 @file{user-theme.el} file.
 
 @vindex custom-enabled-themes
@@ -734,7 +749,7 @@ theme occurring earlier in @code{custom-enabled-themes} takes effect.
   You can temporarily enable a Custom theme with @kbd{M-x
 enable-theme}.  This prompts for a theme name in the minibuffer, loads
 the theme from the theme file if necessary, and enables the theme.
-You can @dfn{disabled} any enabled theme with the command @kbd{M-x
+You can @dfn{disable} any enabled theme with the command @kbd{M-x
 disable-theme}; this returns the options specified in the theme to
 their original values.  To re-enable the theme, type @kbd{M-x
 enable-theme} again.  If a theme file is changed during your Emacs
@@ -755,7 +770,7 @@ have a documentation string which describes what kind of value it should
 have and how the value will be used.
 
   Emacs Lisp allows any variable (with a few exceptions) to have any
-kind of value, but most variables that Emacs uses need a value of a
+kind of value, but most variables that Emacs uses expect a value of a
 certain type.  Often the value should always be a string, or should
 always be a number.  Sometimes we say that a certain feature is turned
 on if a variable is ``non-@code{nil},'' meaning that if the variable's
@@ -766,11 +781,11 @@ variable---is @code{t}.
 
   Emacs uses many Lisp variables for internal record keeping, but the
 most interesting variables for a non-programmer user are those meant
-for users to change---the @dfn{user options}.
+for users to change---these are called @dfn{user options}.
 
   Each user option that you can set with the customization buffer is
 in fact a Lisp variable.  Emacs does not (usually) change the values
-of these variables; instead, you set the values, and thereby alter and
+of these variables on its own; instead, you set the values in order to
 control the behavior of certain Emacs commands.  Use of the
 customization buffer is explained above (@pxref{Easy Customization});
 here we describe other aspects of Emacs variables.
@@ -808,21 +823,30 @@ C-h v fill-column @key{RET}
 displays something like this:
 
 @smallexample
+fill-column is a variable defined in `C source code'.
 fill-column's value is 70
+Local in buffer custom.texi; global value is 70
+Automatically becomes buffer-local when set in any fashion.
+
+This variable is safe to use as a file local variable only if its value
+satisfies the predicate `integerp'.
 
 Documentation:
 *Column beyond which automatic line-wrapping should happen.
-Automatically becomes buffer-local when set in any fashion.
+Interactively, you can set the buffer local value using C-x f.
+
+You can customize this variable.
 @end smallexample
 
 @noindent
-The star at the beginning of the documentation indicates that this
-variable is a user option.  @kbd{C-h v} is not restricted to user
-options; it allows any variable name.
+The line that says you can customize the variable indicates that this
+variable is a user option.  (The star also indicates this, but it is
+an obsolete indicator that may eventually disappear.)  @kbd{C-h v} is
+not restricted to user options; it allows any variable name.
 
 @findex set-variable
-  The most convenient way to set a specific user option variable is
-with @kbd{M-x set-variable}.  This reads the variable name with the
+The most convenient way to set a specific user option variable is with
+@kbd{M-x set-variable}.  This reads the variable name with the
 minibuffer (with completion), and then reads a Lisp expression for the
 new value using the minibuffer a second time (you can insert the old
 value into the minibuffer for editing via @kbd{M-n}).  For example,
@@ -889,13 +913,11 @@ 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.
 
+@findex add-hook
   You can set a hook variable with @code{setq} like any other Lisp
 variable, but the recommended way to add a hook function to a hook
-(either normal or abnormal) is by calling @code{add-hook}.  You can
-specify any valid Lisp function as the hook function, provided it can
-handle the proper number of arguments (zero arguments, in the case of
-a normal hook).  Of course, not every Lisp function is @emph{useful}
-in any particular hook.
+(either normal or abnormal) is by calling @code{add-hook}.
+@xref{Hooks,,, elisp, The Emacs Lisp Reference Manual}.
 
   For example, here's how to set up a hook to turn on Auto Fill mode
 when entering Text mode and other modes based on Text mode:
@@ -936,11 +958,12 @@ they are executed does not matter.  Any dependence on the order is
 ``asking for trouble.''  However, the order is predictable: the most
 recently added hook functions are executed first.
 
+@findex remove-hook
   If you play with adding various different versions of a hook
 function by calling @code{add-hook} over and over, remember that all
 the versions you added will remain in the hook variable together.  You
-can clear out individual functions with @code{remove-hook}, or do
-@code{(setq @var{hook-variable} nil)} to remove everything.
+can clear out individual functions by calling @code{remove-hook}, or
+do @code{(setq @var{hook-variable} nil)} to remove everything.
 
 @node Locals
 @subsection Local Variables
@@ -963,46 +986,41 @@ buffer.  Every other Emacs variable has a @dfn{global} value which is in
 effect in all buffers that have not made the variable local.
 
 @findex make-local-variable
-  @kbd{M-x make-local-variable} reads the name of a variable and makes it
-local to the current buffer.  Further changes in this buffer will not
-affect others, and further changes in the global value will not affect this
-buffer.
+  @kbd{M-x make-local-variable} reads the name of a variable and makes
+it local to the current buffer.  Changing its value subsequently in
+this buffer will not affect others, and changes in its global value
+will not affect this buffer.
 
 @findex make-variable-buffer-local
 @cindex per-buffer variables
-  @kbd{M-x make-variable-buffer-local} reads the name of a variable and
-changes the future behavior of the variable so that it will become local
-automatically when it is set.  More precisely, once a variable has been
-marked in this way, the usual ways of setting the variable automatically
-do @code{make-local-variable} first.  We call such variables
-@dfn{per-buffer} variables.
+  @kbd{M-x make-variable-buffer-local} marks a variable so it will
+become local automatically whenever it is set.  More precisely, once a
+variable has been marked in this way, the usual ways of setting the
+variable automatically do @code{make-local-variable} first.  We call
+such variables @dfn{per-buffer} variables.  Many variables in Emacs
+are normally per-buffer; the variable's document string tells you when
+this is so.  A per-buffer variable's global value is normally never
+effective in any buffer, but it still has a meaning: it is the initial
+value of the variable for each new buffer.
 
   Major modes (@pxref{Major Modes}) always make variables local to the
 buffer before setting the variables.  This is why changing major modes
-in one buffer has no effect on other buffers.  Minor modes also work by
-setting variables---normally, each minor mode has one controlling
-variable which is non-@code{nil} when the mode is enabled (@pxref{Minor
-Modes}).  For most minor modes, the controlling variable is per buffer.
-
-  Emacs contains a number of variables that are always per-buffer.
-These include @code{abbrev-mode}, @code{auto-fill-function},
-@code{case-fold-search}, @code{comment-column}, @code{ctl-arrow},
-@code{fill-column}, @code{fill-prefix}, @code{indent-tabs-mode},
-@code{left-margin}, @code{mode-line-format}, @code{overwrite-mode},
-@code{selective-display-ellipses}, @code{selective-display},
-@code{tab-width}, and @code{truncate-lines}.  Some other variables are
-always local in every buffer, but they are used for internal
-purposes.@refill
+in one buffer has no effect on other buffers.  Minor modes also work
+by setting variables---normally, each minor mode has one controlling
+variable which is non-@code{nil} when the mode is enabled
+(@pxref{Minor Modes}).  For many minor modes, the controlling variable
+is per buffer, and thus always buffer-local.  Otherwise, you can make
+it local in a specific buffer like any other variable.
 
   A few variables cannot be local to a buffer because they are always
 local to each display instead (@pxref{Multiple Displays}).  If you try to
 make one of these variables buffer-local, you'll get an error message.
 
 @findex kill-local-variable
-  @kbd{M-x kill-local-variable} reads the name of a variable and makes
-it cease to be local to the current buffer.  The global value of the
-variable henceforth is in effect in this buffer.  Setting the major mode
-kills all the local variables of the buffer except for a few variables
+  @kbd{M-x kill-local-variable} makes a specified variable cease to be
+local to the current buffer.  The global value of the variable
+henceforth is in effect in this buffer.  Setting the major mode kills
+all the local variables of the buffer except for a few variables
 specially marked as @dfn{permanent locals}.
 
 @findex setq-default
@@ -1045,14 +1063,13 @@ buffer, and sets them to the values specified in the file.
 
 @menu
 * Specifying File Variables:: Specifying file local variables.
-* Unsafe File Variables::     Handling local variables that may not
-                              be safe.
+* Safe File Variables::       Making sure file local variables are safe.
 @end menu
 
 @node Specifying File Variables
 @subsubsection Specifying File Variables
 
-  There are two ways to specify local variable values: in the first
+  There are two ways to specify file local variable values: in the first
 line, or with a local variables list.  Here's how to specify them in the
 first line:
 
@@ -1083,9 +1100,9 @@ the first line as well.
 
 @cindex shell scripts, and local file variables
   In shell scripts, the first line is used to identify the script
-interpreter, so you cannot put any local variables there.  To accommodate
-for this, when Emacs visits a shell script, it looks for local variable
-specifications in the @emph{second} line.
+interpreter, so you cannot put any local variables there.  To
+accommodate this, Emacs looks for local variable specifications in the
+@emph{second} line when the first line specifies an interpreter.
 
   A @dfn{local variables list} goes near the end of the file, in the
 last page.  (It is often best to put it on a page by itself.)  The local
@@ -1098,28 +1115,28 @@ variables list and a @samp{-*-} line, Emacs processes @emph{everything}
 in the @samp{-*-} line first, and @emph{everything} in the local
 variables list afterward.
 
-Here is an example of a local variables list:
+  Here is an example of a local variables list:
 
 @example
-;;; Local Variables: ***
-;;; mode:lisp ***
-;;; comment-column:0 ***
-;;; comment-start: ";;; "  ***
-;;; comment-end:"***" ***
-;;; End: ***
+;; Local Variables: **
+;; mode:lisp **
+;; comment-column:0 **
+;; comment-start: ";; "  **
+;; comment-end:"**" **
+;; End: **
 @end example
 
-  As you see, each line starts with the prefix @samp{;;; } and each line
-ends with the suffix @samp{ ***}.  Emacs recognizes these as the prefix
-and suffix based on the first line of the list, by finding them
+  Each line starts with the prefix @samp{;; } and each line ends with
+the suffix @samp{ **}.  Emacs recognizes these as the prefix and
+suffix based on the first line of the list, by finding them
 surrounding the magic string @samp{Local Variables:}; then it
 automatically discards them from the other lines of the list.
 
   The usual reason for using a prefix and/or suffix is to embed the
 local variables list in a comment, so it won't confuse other programs
 that the file is intended as input for.  The example above is for a
-language where comment lines start with @samp{;;; } and end with
-@samp{***}; the local values for @code{comment-start} and
+language where comment lines start with @samp{;; } and end with
+@samp{**}; the local values for @code{comment-start} and
 @code{comment-end} customize the rest of Emacs for this unusual
 syntax.  Don't use a prefix (or a suffix) if you don't need one.
 
@@ -1156,8 +1173,7 @@ as part of their initialization.
 as the major modes; in fact, you can use it more than once, first to
 set the major mode and then to set minor modes which are specific to
 particular buffers.  But most minor modes should not be specified in
-the file at all, regardless of how, because they represent user
-preferences.
+the file at all, because they represent user preferences.
 
   For example, you may be tempted to try to turn on Auto Fill mode with
 a local variable list.  That is a mistake.  The choice of Auto Fill mode
@@ -1179,63 +1195,68 @@ list need not take the time to search the whole file.
 major mode of a buffer according to the file name and contents,
 including the local variables list if any.  @xref{Choosing Modes}.
 
-@node Unsafe File Variables
-@subsubsection Unsafe File Variables
-
-  File variables create a certain amount of risk; when you visit
-someone else's file, its variables could affect your Emacs in
-arbitrary ways.  A special risk is posed by the @code{eval}
-``variable,'' which can potentially execute arbitrary code, and
-certain actual variables such as @code{load-path}.
-
-  Therefore, whenever Emacs encounters file variables that are not
-known to be safe, it displays the entire list of variables defined in
-that file, and asks you for confirmation before setting them.  You can
-type @samp{y} or @samp{SPC} to apply the local variables list, or
-@samp{n} to ignore it.
-
-  When Emacs is run in batch mode (@pxref{Initial Options}), it
-assumes that the answer is @samp{n}.
-
-  There is a set of file variables and values that are known to be
-safe.  For instance, it is safe to give @code{comment-column} or
-@code{fill-column} any integer value.  If a file specifies only safe
-variable-value pairs, Emacs will not ask for confirmation before
-setting them.  You can also tell Emacs that a set of variable-value
-pairs is safe, by entering @samp{!} at the file variables confirmation
-prompt.  In that case, Emacs will not ask for confirmation if it
-encounters these variable-value pairs in the future.  You can directly
-edit the list of safe variable-value pairs by customizing
+@node Safe File Variables
+@subsubsection Safety of File Variables
+
+  File-local variables can be dangerous; when you visit someone else's
+file, there's no telling what its local variables list could do to
+your Emacs.  Improper values of the @code{eval} ``variable,'' and
+other variables such as @code{load-path}, could execute Lisp code you
+didn't intend to run.
+
+  Therefore, whenever Emacs encounters file local variable values that
+are not known to be safe, it displays the file's entire local
+variables list, and asks you for confirmation before setting them.
+You can type @kbd{y} or @key{SPC} to put the local variables list into
+effect, or @kbd{n} to ignore it.  When Emacs is run in batch mode
+(@pxref{Initial Options}), it can't really ask you, so it assumes the
+answer @kbd{n}.
+
+  Emacs normally recognizes certain variables/value pairs as safe.
+For instance, it is safe to give @code{comment-column} or
+@code{fill-column} any integer value.  If a file specifies only
+known-safe variable/value pairs, Emacs does not ask for confirmation
+before setting them.  Otherwise, you can tell Emacs to record all the
+variable/value pairs in this file as safe, by typing @kbd{!} at the
+confirmation prompt.  When Emacs encounters these variable/value pairs
+subsequently, in the same file or others, it will assume they are
+safe.
+
+@vindex safe-local-variable-values
+@cindex risky variable
+  Some variables, such as @code{load-path}, are considered
+particularly @dfn{risky}: there is seldom any reason to specify them
+as local variables, and changing them can be dangerous.  If a file
+contains only risky local variables, Emacs neither offers nor accepts
+@kbd{!} as input at the confirmation prompt.  If some of the local
+variables in a file are risky, and some are only potentially unsafe, you
+can enter @kbd{!} at the prompt.  It applies all the variables, but only
+marks the non-risky ones as safe for the future.  If you really want to
+record safe values for risky variables, do it directly by customizing
 @samp{safe-local-variable-values} (@pxref{Easy Customization}).
 
-  Some variables, such as @code{load-path}, are considered
-@dfn{risky}: there is seldom any reason to specify them as file
-variables, and changing them can be dangerous.  Even if you enter
-@samp{!} at the confirmation prompt, Emacs will not save these values
-for the future.  Therefore, you will be prompted each time the
-variable is encountered.  If you really want to allow such a variable,
-you can avoid the prompt by editing @samp{safe-local-variable-values}.
-
-@findex enable-local-variables
+@vindex enable-local-variables
   The variable @code{enable-local-variables} allows you to change the
 way Emacs processes local variables.  Its default value is @code{t},
-which means the behavior described above.  If you set the value to
-@code{nil}, Emacs simply ignores local variables in files.  Any other
-value says to query you about each file that has local variables, even
-if the variables are known to be safe.
+which specifies the behavior described above.  If it is @code{nil},
+Emacs simply ignores all file local variables.  @code{:safe} means use
+only the safe values and ignore the rest.  Any other value says to
+query you about each file that has local variables, without trying to
+determine whether the values are known to be safe.
 
-@findex enable-local-eval
+@vindex enable-local-eval
   The variable @code{enable-local-eval} controls whether Emacs
 processes @code{eval} variables.  The three possibilities for the
 variable's value are @code{t}, @code{nil}, and anything else, just as
 for @code{enable-local-variables}.  The default is @code{maybe}, which
 is neither @code{t} nor @code{nil}, so normally Emacs does ask for
-confirmation about processes @code{eval} variables.
+confirmation about processing @code{eval} variables.
 
-@findex safe-local-eval-forms
-  The @code{safe-local-eval-forms} is a customizable list of eval
-forms which are safe to eval, so Emacs should not ask for
-confirmation to evaluate these forms.
+@vindex safe-local-eval-forms
+  But there is an exception.  The @code{safe-local-eval-forms} is a
+customizable list of eval forms which are safe.  Emacs does not ask
+for confirmation when it finds these forms for the @code{eval}
+variable.
 
 @node Key Bindings
 @section Customizing Key Bindings
@@ -1247,7 +1268,7 @@ to customize key bindings.
 
   Recall that a command is a Lisp function whose definition provides for
 interactive use.  Like every Lisp function, a command has a function
-name which usually consists of lower-case letters and hyphens.
+name, which usually consists of lower-case letters and hyphens.
 
 @menu
 * Keymaps::             Generalities.  The global keymap.
@@ -1258,7 +1279,6 @@ name which usually consists of lower-case letters and hyphens.
 * Init Rebinding::      Rebinding keys with your init file, @file{.emacs}.
 * Function Keys::       Rebinding terminal function keys.
 * Named ASCII Chars::   Distinguishing @key{TAB} from @kbd{C-i}, and so on.
-* Non-ASCII Rebinding:: Rebinding non-@acronym{ASCII} characters such as Latin-1.
 * Mouse Buttons::       Rebinding mouse buttons in Emacs.
 * Disabling::           Disabling a command means confirmation is required
                           before it can be executed.  This is done to protect
@@ -1406,19 +1426,6 @@ mode.
 in effect, the definitions in its keymap override both the major
 mode's local keymap and the global keymap.
 
-@vindex c-mode-map
-@vindex lisp-mode-map
-  The local keymaps for Lisp mode and several other major modes always
-exist even when not in use.  These are kept in variables named
-@code{lisp-mode-map} and so on.  For major modes less often used, the
-local keymap is normally constructed only when the mode is used for the
-first time in a session.  This is to save space.  If you wish to change
-one of these keymaps, you must use the major mode's @dfn{mode
-hook}---see below.
-
-  All minor mode keymaps are created in advance.  There is no way to
-defer their creation until the first time the minor mode is enabled.
-
   A local keymap can locally redefine a key as a prefix key by defining
 it as a prefix keymap.  If the key is also defined globally as a prefix,
 then its local and global definitions (both keymaps) effectively
@@ -1434,17 +1441,16 @@ sequence by looking in several keymaps, one by one, for a binding of the
 whole key sequence.  First it checks the minor mode keymaps for minor
 modes that are enabled, then it checks the major mode's keymap, and then
 it checks the global keymap.  This is not precisely how key lookup
-works, but it's good enough for understanding ordinary circumstances.
+works, but it's good enough for understanding the results in ordinary
+circumstances.
 
 @cindex rebinding major mode keys
-@findex define-key
-  To change the local bindings of a major mode, you must change the
-mode's local keymap.  Normally you must wait until the first time the
-mode is used, because most major modes don't create their keymaps until
-then.  If you want to specify something in your @file{~/.emacs} file to
-change a major mode's bindings, you must use the mode's mode hook to
-delay the change until the mode is first used.
+  Most major modes construct their keymaps when the mode is used for
+the first time in a session.  If you wish to change one of these
+keymaps, you must use the major mode's @dfn{mode hook}
+(@pxref{Hooks}).
 
+@findex define-key
   For example, the command @code{texinfo-mode} to select Texinfo mode
 runs the hook @code{texinfo-mode-hook}.  Here's how you can use the hook
 to add local bindings (not very useful, we admit) for @kbd{C-c n} and
@@ -1459,8 +1465,6 @@ to add local bindings (not very useful, we admit) for @kbd{C-c n} and
                          'forward-paragraph)))
 @end example
 
-  @xref{Hooks}.
-
 @node Minibuffer Maps
 @subsection Minibuffer Keymaps
 
@@ -1486,7 +1490,7 @@ just like @key{RET}.  This is used mainly for Mocklisp compatibility.
 @code{minibuffer-local-must-match-map} is for strict completion and
 for cautious completion.
 @item
-@code{minibuffer-local-filename-completion-map} and
+Finally, @code{minibuffer-local-filename-completion-map} and
 @code{minibuffer-local-must-match-filename-map} are like the two
 previous ones, but they are specifically for file name completion.
 They do not bind @key{SPC}.
@@ -1546,10 +1550,10 @@ key to rebind.
   You can rebind a key that contains more than one event in the same
 way.  Emacs keeps reading the key to rebind until it is a complete key
 (that is, not a prefix key).  Thus, if you type @kbd{C-f} for
-@var{key}, that's the end; the minibuffer is entered immediately to
-read @var{cmd}.  But if you type @kbd{C-x}, another character is read;
-if that is @kbd{4}, another character is read, and so on.  For
-example,
+@var{key}, that's the end; it enters the minibuffer immediately to
+read @var{cmd}.  But if you type @kbd{C-x}, since that's a prefix, it
+reads another character; if that is @kbd{4}, another prefix character,
+it reads one more character, and so on.  For example,
 
 @example
 M-x global-set-key @key{RET} C-x 4 $ spell-other-window @key{RET}
@@ -1573,9 +1577,9 @@ definition (or lack of one) come back into effect in that major mode.
   If you have redefined (or undefined) a key and you subsequently wish
 to retract the change, undefining the key will not do the job---you need
 to redefine the key with its standard definition.  To find the name of
-the standard definition of a key, go to a Fundamental mode buffer and
-use @kbd{C-h c}.  The documentation of keys in this manual also lists
-their command names.
+the standard definition of a key, go to a Fundamental mode buffer in a
+fresh Emacs and use @kbd{C-h c}.  The documentation of keys in this
+manual also lists their command names.
 
   If you want to prevent yourself from invoking a command by mistake, it
 is better to disable the command than to undefine the key.  A disabled
@@ -1670,11 +1674,11 @@ rewrite the first six examples above to use vectors:
 
 @noindent
 As you see, you represent a multi-character key sequence with a vector
-by listing all of the characters in order within the square brackets that
-delimit the vector.
+by listing all of the characters, in order, within the square brackets
+that delimit the vector.
 
   Language and coding systems can cause problems with key bindings
-for non-@acronym{ASCII} characters.  @xref{Non-ASCII Rebinding}.
+for non-@acronym{ASCII} characters.  @xref{Init Non-ASCII}.
 
 @node Function Keys
 @subsection Rebinding Function Keys
@@ -1815,36 +1819,6 @@ this @acronym{ASCII} character, and another for the ``function key'' @code{tab}.
 between @key{TAB} and @kbd{C-i} (and likewise for other such pairs),
 because the terminal sends the same character in both cases.
 
-@node Non-ASCII Rebinding
-@subsection Non-@acronym{ASCII} Characters on the Keyboard
-@cindex rebinding non-@acronym{ASCII} keys
-@cindex non-@acronym{ASCII} keys, binding
-
-If your keyboard has keys that send non-@acronym{ASCII}
-characters, such as accented letters, rebinding these keys
-must be done by using a vector like this@footnote{Note that
-you should avoid the string syntax for binding
-non-@acronym{ASCII} characters, since they will be
-interpreted as meta keys.  @xref{Strings of Events,,,elisp,
-The Emacs Lisp Reference Manual}.}:
-
-@example
-(global-set-key [?@var{char}] 'some-function)
-@end example
-
-@noindent
-Type @kbd{C-q} followed by the key you want to bind, to insert @var{char}.
-
-Since this puts a non-@acronym{ASCII} character in the @file{.emacs},
-you should specify a coding system for that file that supports the
-character in question.  @xref{Init Syntax}.
-
-@strong{Warning:} if you change the keyboard encoding, or change
-between multibyte and unibyte mode, or anything that would alter which
-code @kbd{C-q} would insert for that character, you'll need to edit
-the Lisp expression accordingly, to use the character code generated
-by @kbd{C-q} in the new mode.
-
 @node Mouse Buttons
 @subsection Rebinding Mouse Buttons
 @cindex mouse button events
@@ -1981,19 +1955,20 @@ usual to do so.
 @subsection Disabling Commands
 @cindex disabled command
 
-  Disabling a command marks the command as requiring confirmation before it
-can be executed.  The purpose of disabling a command is to prevent
-beginning users from executing it by accident and being confused.
-
-  An attempt to invoke a disabled command interactively in Emacs
-displays a window containing the command's name, its documentation, and
-some instructions on what to do immediately; then Emacs asks for input
-saying whether to execute the command as requested, enable it and
-execute it, or cancel.  If you decide to enable the command, you are
-asked whether to do this permanently or just for the current session.
-(Enabling permanently works by automatically editing your @file{.emacs}
-file.)  You can also type @kbd{!} to enable @emph{all} commands,
-for the current session only.
+  Disabling a command means that invoking it interactively asks for
+confirmation from the user.  The purpose of disabling a command is to
+prevent users from executing it by accident; we do this for commands
+that might be confusing to the uninitiated.
+
+  Attempting to invoke a disabled command interactively in Emacs
+displays a window containing the command's name, its documentation,
+and some instructions on what to do immediately; then Emacs asks for
+input saying whether to execute the command as requested, enable it
+and execute it, or cancel.  If you decide to enable the command, you
+must then answer another question---whether to do this permanently, or
+just for the current session.  (Enabling permanently works by
+automatically editing your @file{.emacs} file.)  You can also type
+@kbd{!} to enable @emph{all} commands, for the current session only.
 
   The direct mechanism for disabling a command is to put a
 non-@code{nil} @code{disabled} property on the Lisp symbol for the
@@ -2014,20 +1989,19 @@ is included in the message displayed when the command is used:
 @findex disable-command
 @findex enable-command
   You can make a command disabled either by editing the @file{.emacs}
-file directly or with the command @kbd{M-x disable-command}, which edits
+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.
+@file{~/.emacs} init file.  Doing so could lose information
+because Emacs has not read your init file.
 
   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
-function from Lisp programs.
+@kbd{M-x}.  However, disabling a command has no effect on calling it
+as a function from Lisp programs.
 
 @node Syntax
 @section The Syntax Table
@@ -2041,7 +2015,7 @@ one of fifteen-odd @dfn{syntax classes}.  In some cases it specifies
 some additional information also.
 
   Each major mode has its own syntax table (though related major modes
-sometimes share one syntax table) which it installs in each buffer
+sometimes share one syntax table), which it installs in each buffer
 that uses the mode.  The syntax table installed in the current buffer
 is the one that all commands use, so we call it ``the'' syntax table.
 
@@ -2049,7 +2023,7 @@ is the one that all commands use, so we call it ``the'' syntax table.
 @findex describe-syntax
   To display a description of the contents of the current syntax
 table, type @kbd{C-h s} (@code{describe-syntax}).  The description of
-each character includes both the string you would have to give to
+each character includes the string you would have to give to
 @code{modify-syntax-entry} to set up that character's current syntax,
 starting with the character which designates its syntax class, plus
 some English text to explain its meaning.
@@ -2067,9 +2041,8 @@ Reference Manual}.
 @cindex rebinding keys, permanently
 @cindex startup (init file)
 
-  When Emacs is started, it normally loads a Lisp program from the
-file @file{.emacs} or @file{.emacs.el} in your home directory
-(see @ref{General Variables, HOME}, if you don't know where that is).
+  When Emacs is started, it normally loads a Lisp program from the file
+@file{.emacs} or @file{.emacs.el} in your home directory (@pxref{Find Init}).
 We call this file your @dfn{init file} because it specifies how to
 initialize Emacs for you.  You can use the command line switch
 @samp{-q} to prevent loading your init file, and @samp{-u} (or
@@ -2115,16 +2088,17 @@ for more information about compiling Emacs Lisp programs.
 
   If you are going to write actual Emacs Lisp programs that go beyond
 minor customization, you should read the @cite{Emacs Lisp Reference Manual}.
-@ifinfo
+@ifnottex
 @xref{Top, Emacs Lisp, Emacs Lisp, elisp, the Emacs Lisp Reference
 Manual}.
-@end ifinfo
+@end ifnottex
 
 @menu
 * Init Syntax::                Syntax of constants in Emacs Lisp.
 * Init Examples::       How to do some things with an init file.
 * Terminal Init::       Each terminal type can have an init file.
 * Find Init::          How Emacs finds the init file.
+* Init Non-ASCII::      Using non-@acronym{ASCII} characters in an init file.
 @end menu
 
 @node Init Syntax
@@ -2175,16 +2149,8 @@ sequences are mandatory.
 a Meta character, as in @samp{\M-a} for @kbd{Meta-A} or @samp{\M-\C-a} for
 @kbd{Control-Meta-A}.@refill
 
-@cindex international characters in @file{.emacs}
-@cindex non-@acronym{ASCII} characters in @file{.emacs}
-If you want to include non-@acronym{ASCII} characters in strings in your init
-file, you should consider putting a @w{@samp{-*-coding:
-@var{coding-system}-*-}} tag on the first line which states the coding
-system used to save your @file{.emacs}, as explained in @ref{Recognize
-Coding}.  This is because the defaults for decoding non-@acronym{ASCII} text might
-not yet be set up by the time Emacs reads those parts of your init file
-which use such strings, possibly leading Emacs to decode those strings
-incorrectly.
+@xref{Init Non-ASCII}, for information about including
+non-@acronym{ASCII} in your init file.
 
 @item Characters:
 Lisp character constant syntax consists of a @samp{?} followed by
@@ -2193,7 +2159,7 @@ Examples: @code{?x}, @code{?\n}, @code{?\"}, @code{?\)}.  Note that
 strings and characters are not interchangeable in Lisp; some contexts
 require one and some contexts require the other.
 
-@xref{Non-ASCII Rebinding}, for information about binding commands to
+@xref{Init Non-ASCII}, for information about binding commands to
 keys which send non-@acronym{ASCII} characters.
 
 @item True:
@@ -2242,7 +2208,7 @@ is not what you probably want to do in an init file.
 Specify your own email address, if Emacs can't figure it out correctly.
 
 @example
-(setq user-mail-address "coon@@yoyodyne.com")
+(setq user-mail-address "rumsfeld@@torture.gov")
 @end example
 
 Various Emacs packages that need your own email address use the value of
@@ -2502,6 +2468,48 @@ otherwise, it looks up the home directory corresponding to that user
 name in the system's data base of users.
 @c  LocalWords:  backtab
 
+@node Init Non-ASCII
+@subsection Non-@acronym{ASCII} Characters in Init Files
+@cindex international characters in @file{.emacs}
+@cindex non-@acronym{ASCII} characters in @file{.emacs}
+@cindex non-@acronym{ASCII} keys, binding
+@cindex rebinding non-@acronym{ASCII} keys
+
+  Language and coding systems may cause problems if your init file
+contains non-@acronym{ASCII} characters, such as accented letters, in
+strings or key bindings.
+
+  If you want to use non-@acronym{ASCII} characters in your init file,
+you should put a @w{@samp{-*-coding: @var{coding-system}-*-}} tag on
+the first line of the init file, and specify a coding system that
+supports the character(s) in question.  @xref{Recognize Coding}.  This
+is because the defaults for decoding non-@acronym{ASCII} text might
+not yet be set up by the time Emacs reads those parts of your init
+file which use such strings, possibly leading Emacs to decode those
+strings incorrectly.  You should then avoid adding Emacs Lisp code
+that modifies the coding system in other ways, such as calls to
+@code{set-language-environment}.
+
+  To bind non-@acronym{ASCII} keys, you must use a vector (@pxref{Init
+Rebinding}).  The string syntax cannot be used, since the
+non-@acronym{ASCII} characters will be interpreted as meta keys.  For
+instance:
+
+@example
+(global-set-key [?@var{char}] 'some-function)
+@end example
+
+@noindent
+Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}.
+
+  @strong{Warning:} if you change the keyboard encoding, or change
+between multibyte and unibyte mode, or anything that would alter which
+code @kbd{C-q} would insert for that character, this keybinding may
+stop working.  It is therefore advisable to use one and only one
+coding system, for your init file as well as the files you edit.  For
+example, don't mix the @samp{latin-1} and @samp{latin-9} coding
+systems.
+
 @ignore
    arch-tag: c68abddb-4410-4fb5-925f-63394e971d93
 @end ignore