@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2002,
-@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
+@c 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/variables
@node Variables, Functions, Control Structures, Top
@node Constant Variables
@section Variables that Never Change
-@vindex nil
-@vindex t
@kindex setting-constant
@cindex keyword symbol
+@cindex variable with constant value
+@cindex constant variables
+@cindex symbol that evaluates to itself
+@cindex symbol with constant value
In Emacs Lisp, certain symbols normally evaluate to themselves. These
include @code{nil} and @code{t}, as well as any symbol whose name starts
@item @dots{}-command
The value is a whole shell command.
-@item @samp{}-switches
+@item @dots{}-switches
The value specifies options for a command.
@end table
@node Buffer-Local Variables
@section Buffer-Local Variables
-@cindex variables, buffer-local
+@cindex variable, buffer-local
@cindex buffer-local variables
Global and local variable bindings are found in most programming
@node Frame-Local Variables
@section Frame-Local Variables
+@cindex frame-local variables
Just as variables can have buffer-local bindings, they can also have
frame-local bindings. These bindings belong to one frame, and are in
@node File Local Variables
@section File Local Variables
+@cindex file local variables
A file can specify local variable values; Emacs uses these to create
buffer-local bindings for those variables in the buffer visiting that
processing of file local variables.
@defopt enable-local-variables
-This variable controls whether to process file local variables. A
-value of @code{t} means to process them, querying the user if unsafe
-variables are encountered; @code{nil} means ignore them; anything else
-means to query the user for each file. The default value is @code{t}.
+This variable controls whether to process file local variables.
+The possible values are:
+
+@table @asis
+@item @code{t} (the default)
+Set the safe variables, and query (once) about any unsafe variables.
+@item @code{:safe}
+Set only the safe variables and do not query.
+@item @code{:all}
+Set all the variables and do not query.
+@item @code{nil}
+Don't set any variables.
+@item anything else
+Query (once) about all the variables.
+@end table
@end defopt
@defun hack-local-variables &optional mode-only
the value @var{val}, based on the above criteria.
@end defun
-@cindex risky local variable
+@c @cindex risky local variable Duplicates risky-local-variable
Some variables are considered @dfn{risky}. A variable whose name
ends in any of @samp{-command}, @samp{-frame-alist}, @samp{-function},
@samp{-functions}, @samp{-hook}, @samp{-hooks}, @samp{-form},
@node Variable Aliases
@section Variable Aliases
+@cindex variable aliases
It is sometimes useful to make two variables synonyms, so that both
variables always have the same value, and changing either one also
@defun defvaralias new-alias base-variable &optional docstring
This function defines the symbol @var{new-alias} as a variable alias
-for symbol @var{base-variable}. This means that retrieving the value of
-@var{new-alias} returns the value of @var{base-variable}, and changing the
-value of @var{new-alias} changes the value of @var{base-variable}.
+for symbol @var{base-variable}. This means that retrieving the value
+of @var{new-alias} returns the value of @var{base-variable}, and
+changing the value of @var{new-alias} changes the value of
+@var{base-variable}. The two aliased variable names always share the
+same value and the same bindings.
If the @var{docstring} argument is non-@code{nil}, it specifies the
documentation for @var{new-alias}; otherwise, the alias gets the same