]> code.delx.au - gnu-emacs/blobdiff - lispref/variables.texi
*** empty log message ***
[gnu-emacs] / lispref / variables.texi
index c3fe6cf6a23dcde1a316d0f3ed34bd0177eb06b3..cd7c22b0bff110cd72a6ad61bdc182689a9c8e7a 100644 (file)
@@ -276,7 +276,7 @@ that Lisp avoids infinite recursion on an ill-defined function.
 @code{max-lisp-eval-depth} provides another limit on depth of nesting.
 @xref{Definition of max-lisp-eval-depth,, Eval}.
 
-The default value is 600.  Entry to the Lisp debugger increases the
+The default value is 1000.  Entry to the Lisp debugger increases the
 value, if there is little room left, to make sure the debugger itself
 has room to execute.
 @end defvar
@@ -1777,16 +1777,15 @@ visiting a file could take over your Emacs.  Emacs takes several
 measures to prevent this.
 
 @cindex safe local variable
-  A variable can be marked as @dfn{safe} by setting its
-@code{safe-local-variable} property.  If the property is @code{t},
-setting that variable in a file is always considered safe, regardless
-of the value assigned to it.  The @code{safe-local-variable} property
-can also be a function of one argument.  In that case, Emacs considers
-it safe to give the variable a certain value if the function returns
-non-@code{nil} when given that value as argument.  Many
-commonly-encountered file variables standardly have
-@code{safe-local-variable} properties, including @code{fill-column},
-@code{fill-prefix}, and @code{indent-tabs-mode}.
+  You can specify safe values for a variable with a
+@code{safe-local-variable} property.  The property has to be
+a function of one argument; any value is safe if the function
+returns non-@code{nil} given that value.  Many commonly encountered
+file variables standardly have @code{safe-local-variable} properties,
+including @code{fill-column}, @code{fill-prefix}, and
+@code{indent-tabs-mode}.  For boolean-valued variables that are safe,
+use @code{booleanp} as the property value.  Lambda expressions should
+be quoted so that @code{describe-variable} can display the predicate.
 
 @defopt safe-local-variable-values
 This variable provides another way to mark some variable values as
@@ -1794,10 +1793,11 @@ safe.  It is a list of cons cells @code{(@var{var} . @var{val})},
 where @var{var} is a variable name and @var{val} is a value which is
 safe for that variable.
 
-When Emacs asks the user whether or not to obey a set of file variable
-specifications, the user can choose to mark them as safe.  Doing so
-adds those variable-value pairs to @code{safe-local-variable-values},
-and saves it to the user's custom file.
+When Emacs asks the user whether or not to obey a set of file local
+variable specifications, the user can choose to mark them as safe.
+Doing so adds those variable/value pairs to
+@code{safe-local-variable-values}, and saves it to the user's custom
+file.
 @end defopt
 
 @defun safe-local-variable-p sym val
@@ -1825,8 +1825,8 @@ based on the above criteria.
   If a variable is risky, it will not be entered automatically into
 @code{safe-local-variable-values} as described above.  Therefore,
 Emacs will always query before setting a risky variable, unless the
-user explicitly allows it by editing @code{safe-local-variable-values}
-via Customize.
+user explicitly allows the setting by customizing
+@code{safe-local-variable-values} directly.
 
 @defvar ignored-local-variables
 This variable holds a list of variables that should not be given local
@@ -1845,6 +1845,19 @@ unconditionally; @code{nil} means ignore them; anything else means ask
 the user what to do for each file.  The default value is @code{maybe}.
 @end defopt
 
+@defopt safe-local-eval-forms
+This variable holds a list of expressions that are safe to
+evaluate when found in the @samp{Eval:} ``variable'' in a file
+local variables list.
+@end defopt
+
+  If the expression is a function call and the function has a
+@code{safe-local-eval-function} property, the property value
+determines whether the expression is safe to evaluate.  The property
+value can be a predicate to call to test the expression, a list of
+such predicates (it's safe if any predicate succeeds), or @code{t}
+(always safe provided the arguments are constant).
+
   Text properties are also potential loopholes, since their values
 could include functions to call.  So Emacs discards all text
 properties from string values specified for file local variables.