]> code.delx.au - gnu-emacs/blobdiff - man/custom.texi
(setfilename): Go up one more level to ../../info.
[gnu-emacs] / man / custom.texi
index 682cb5b93107e3ee8e9ce3921f5599cabde20af7..d496ab84b190ea0468e84cf865806b8535643720 100644 (file)
@@ -1,6 +1,6 @@
 @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
@@ -231,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.
@@ -246,7 +250,7 @@ Interfacing to external utilities.
 @var{more second-level groups}
 
 \- Emacs group end ------------------------------------------------/
-
+@end group
 @end smallexample
 
 @noindent
@@ -471,7 +475,7 @@ 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 settings
@@ -621,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}
@@ -630,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
@@ -659,9 +665,9 @@ 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 settings (variables and 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
   For a more general way of controlling what to customize, you can use
@@ -681,11 +687,11 @@ 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
@@ -1220,10 +1226,13 @@ safe.
 @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.  Even if you
-enter @kbd{!} at the confirmation prompt, Emacs will not record any
-values as safe for these variables.  If you really want to record safe
-values for these variables, do it directly by customizing
+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}).
 
 @vindex enable-local-variables
@@ -1241,7 +1250,7 @@ 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.
 
 @vindex safe-local-eval-forms
   But there is an exception.  The @code{safe-local-eval-forms} is a
@@ -1270,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
@@ -1670,7 +1678,7 @@ 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
@@ -1811,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{You must
-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 Non-ASCII}.
-
-  @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
@@ -2120,6 +2098,7 @@ Manual}.
 * 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
@@ -2170,17 +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}
-@anchor{Init Non-ASCII}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
@@ -2189,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:
@@ -2498,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