aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
authorLuc Teirlinck2005-05-15 16:53:06 +0000
committerLuc Teirlinck2005-05-15 16:53:06 +0000
commita191491224dfdd96ed523dba75a00a228b4cc2f4 (patch)
tree79fa5c22bd38a14cc4bc2cd609db3014afcbd023 /lispref
parent85ddb888e78692909d3c0a822df12df5092a1c37 (diff)
downloademacs-a191491224dfdd96ed523dba75a00a228b4cc2f4.tar.gz
emacs-a191491224dfdd96ed523dba75a00a228b4cc2f4.zip
(File Local Variables): Do not refer to the `-*-' line as
a "local variables list". Add pxref.
Diffstat (limited to 'lispref')
-rw-r--r--lispref/variables.texi34
1 files changed, 17 insertions, 17 deletions
diff --git a/lispref/variables.texi b/lispref/variables.texi
index 28eab924eca..6040a4c09ae 100644
--- a/lispref/variables.texi
+++ b/lispref/variables.texi
@@ -1784,15 +1784,15 @@ foo
1784@section File Local Variables 1784@section File Local Variables
1785 1785
1786 This section describes the functions and variables that affect 1786 This section describes the functions and variables that affect
1787processing of local variables lists in files. @xref{File variables, , 1787processing of file local variables. @xref{File variables, ,
1788Local Variables in Files, emacs, The GNU Emacs Manual}, for basic 1788Local Variables in Files, emacs, The GNU Emacs Manual}, for basic
1789information about file local variables. 1789information about file local variables.
1790 1790
1791@defopt enable-local-variables 1791@defopt enable-local-variables
1792This variable controls whether to process file local variables lists. A 1792This variable controls whether to process file local variables. A
1793value of @code{t} means process the local variables lists 1793value of @code{t} means process them unconditionally; @code{nil} means
1794unconditionally; @code{nil} means ignore them; anything else means ask 1794ignore them; anything else means ask the user what to do for each
1795the user what to do for each file. The default value is @code{t}. 1795file. The default value is @code{t}.
1796@end defopt 1796@end defopt
1797 1797
1798@defun hack-local-variables &optional mode-only 1798@defun hack-local-variables &optional mode-only
@@ -1801,7 +1801,7 @@ variables specified by the contents of the current buffer. The variable
1801@code{enable-local-variables} has its effect here. However, this 1801@code{enable-local-variables} has its effect here. However, this
1802function does not look for the @samp{mode:} local variable in the 1802function does not look for the @samp{mode:} local variable in the
1803@w{@samp{-*-}} line. @code{set-auto-mode} does that, also taking 1803@w{@samp{-*-}} line. @code{set-auto-mode} does that, also taking
1804@code{enable-local-variables} into account. 1804@code{enable-local-variables} into account (@pxref{Auto Major Mode}).
1805 1805
1806If the optional argument @var{mode-only} is non-@code{nil}, then all 1806If the optional argument @var{mode-only} is non-@code{nil}, then all
1807this function does is return @code{t} if the @w{@samp{-*-}} line or 1807this function does is return @code{t} if the @w{@samp{-*-}} line or
@@ -1809,21 +1809,21 @@ the local variables list specifies a mode and @code{nil} otherwise.
1809It does not set the mode nor any other file local variable. 1809It does not set the mode nor any other file local variable.
1810@end defun 1810@end defun
1811 1811
1812 If a file local variable list could specify a function that would 1812 If a file local variable could specify a function that would
1813be called later, or an expression that would be executed later, simply 1813be called later, or an expression that would be executed later, simply
1814visiting a file could take over your Emacs. To prevent this, Emacs 1814visiting a file could take over your Emacs. To prevent this, Emacs
1815takes care not to allow local variable lists to set such variables. 1815takes care not to allow to set such file local variables.
1816 1816
1817 For one thing, any variable whose name ends in @samp{-command}, 1817 For one thing, any variable whose name ends in @samp{-command},
1818@samp{-frame-alist}, @samp{-function}, @samp{-functions}, 1818@samp{-frame-alist}, @samp{-function}, @samp{-functions},
1819@samp{-hook}, @samp{-hooks}, @samp{-form}, @samp{-forms}, @samp{-map}, 1819@samp{-hook}, @samp{-hooks}, @samp{-form}, @samp{-forms}, @samp{-map},
1820@samp{-map-alist}, @samp{-mode-alist}, @samp{-program}, or 1820@samp{-map-alist}, @samp{-mode-alist}, @samp{-program}, or
1821@samp{-predicate} cannot be set in a local variable list. In general, 1821@samp{-predicate} cannot be given a file local value. In general,
1822you should use such a name whenever it is appropriate for the 1822you should use such a name whenever it is appropriate for the
1823variable's meaning. The variables @samp{font-lock-keywords}, 1823variable's meaning. The variables @samp{font-lock-keywords},
1824@samp{font-lock-keywords-[0-9]}, and 1824@samp{font-lock-keywords-[0-9]}, and
1825@samp{font-lock-syntactic-keywords} cannot be set in a local variable 1825@samp{font-lock-syntactic-keywords} cannot be given file local values either.
1826list, either. These rules can be overridden by giving the variable's 1826These rules can be overridden by giving the variable's
1827name a non-@code{nil} @code{safe-local-variable} property. If one 1827name a non-@code{nil} @code{safe-local-variable} property. If one
1828gives it a @code{safe-local-variable} property of @code{t}, then one 1828gives it a @code{safe-local-variable} property of @code{t}, then one
1829can give the variable any file local value. One can also give any 1829can give the variable any file local value. One can also give any
@@ -1838,9 +1838,9 @@ argument.
1838variables listed in @code{ignored-local-variables}: 1838variables listed in @code{ignored-local-variables}:
1839 1839
1840@defvar ignored-local-variables 1840@defvar ignored-local-variables
1841This variable holds a list of variables that should not be 1841This variable holds a list of variables that should not be given local
1842set by a file's local variables list. Any value specified 1842values by files. Any value specified for one of these variables is
1843for one of these variables is ignored. 1843ignored.
1844@end defvar 1844@end defvar
1845 1845
1846@defun risky-local-variable-p sym &optional val 1846@defun risky-local-variable-p sym &optional val
@@ -1855,7 +1855,8 @@ value whatsoever.
1855normally asks for confirmation before handling it. 1855normally asks for confirmation before handling it.
1856 1856
1857@defopt enable-local-eval 1857@defopt enable-local-eval
1858This variable controls processing of @samp{Eval:} in local variables 1858This variable controls processing of @samp{Eval:} in @samp{-*-} lines
1859or local variables
1859lists in files being visited. A value of @code{t} means process them 1860lists in files being visited. A value of @code{t} means process them
1860unconditionally; @code{nil} means ignore them; anything else means ask 1861unconditionally; @code{nil} means ignore them; anything else means ask
1861the user what to do for each file. The default value is @code{maybe}. 1862the user what to do for each file. The default value is @code{maybe}.
@@ -1863,8 +1864,7 @@ the user what to do for each file. The default value is @code{maybe}.
1863 1864
1864 Text properties are also potential loopholes, since their values 1865 Text properties are also potential loopholes, since their values
1865could include functions to call. So Emacs discards all text 1866could include functions to call. So Emacs discards all text
1866properties from string values specified in a file's local variables 1867properties from string values specified for file local variables.
1867list.
1868 1868
1869@node Variables with Restricted Values 1869@node Variables with Restricted Values
1870@section Variables with Restricted Values 1870@section Variables with Restricted Values