]> code.delx.au - gnu-emacs/blobdiff - lispref/variables.texi
(File Name Expansion): Clarify previous change.
[gnu-emacs] / lispref / variables.texi
index 5c54701cdd459335332cfab9736bfc36ed62c3b9..9d9dc8260bba836ff72c92157739d753a83a3a34 100644 (file)
@@ -1,7 +1,7 @@
 @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
@@ -100,10 +100,12 @@ x
 
 @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
@@ -626,7 +628,7 @@ The value is a program name.
 @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
 
@@ -1079,7 +1081,7 @@ use short names like @code{x}.
 
 @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
@@ -1520,6 +1522,7 @@ an ordinary evaluated argument.
 
 @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
@@ -1644,6 +1647,7 @@ local bindings, we will provide it in a subsequent Emacs version.
 
 @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
@@ -1653,10 +1657,21 @@ This section describes the functions and variables that affect
 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
@@ -1707,7 +1722,7 @@ This function returns non-@code{nil} if it is safe to give @var{sym}
 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},
@@ -1766,6 +1781,7 @@ properties from string values specified for file local variables.
 
 @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
@@ -1777,9 +1793,11 @@ compatibility.  You can do this with @code{defvaralias}.
 
 @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