diff options
| author | Luc Teirlinck | 2005-05-15 16:53:06 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-05-15 16:53:06 +0000 |
| commit | a191491224dfdd96ed523dba75a00a228b4cc2f4 (patch) | |
| tree | 79fa5c22bd38a14cc4bc2cd609db3014afcbd023 /lispref | |
| parent | 85ddb888e78692909d3c0a822df12df5092a1c37 (diff) | |
| download | emacs-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.texi | 34 |
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 |
| 1787 | processing of local variables lists in files. @xref{File variables, , | 1787 | processing of file local variables. @xref{File variables, , |
| 1788 | Local Variables in Files, emacs, The GNU Emacs Manual}, for basic | 1788 | Local Variables in Files, emacs, The GNU Emacs Manual}, for basic |
| 1789 | information about file local variables. | 1789 | information about file local variables. |
| 1790 | 1790 | ||
| 1791 | @defopt enable-local-variables | 1791 | @defopt enable-local-variables |
| 1792 | This variable controls whether to process file local variables lists. A | 1792 | This variable controls whether to process file local variables. A |
| 1793 | value of @code{t} means process the local variables lists | 1793 | value of @code{t} means process them unconditionally; @code{nil} means |
| 1794 | unconditionally; @code{nil} means ignore them; anything else means ask | 1794 | ignore them; anything else means ask the user what to do for each |
| 1795 | the user what to do for each file. The default value is @code{t}. | 1795 | file. 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 |
| 1802 | function does not look for the @samp{mode:} local variable in the | 1802 | function 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 | ||
| 1806 | If the optional argument @var{mode-only} is non-@code{nil}, then all | 1806 | If the optional argument @var{mode-only} is non-@code{nil}, then all |
| 1807 | this function does is return @code{t} if the @w{@samp{-*-}} line or | 1807 | this 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. | |||
| 1809 | It does not set the mode nor any other file local variable. | 1809 | It 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 |
| 1813 | be called later, or an expression that would be executed later, simply | 1813 | be called later, or an expression that would be executed later, simply |
| 1814 | visiting a file could take over your Emacs. To prevent this, Emacs | 1814 | visiting a file could take over your Emacs. To prevent this, Emacs |
| 1815 | takes care not to allow local variable lists to set such variables. | 1815 | takes 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, |
| 1822 | you should use such a name whenever it is appropriate for the | 1822 | you should use such a name whenever it is appropriate for the |
| 1823 | variable's meaning. The variables @samp{font-lock-keywords}, | 1823 | variable'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. |
| 1826 | list, either. These rules can be overridden by giving the variable's | 1826 | These rules can be overridden by giving the variable's |
| 1827 | name a non-@code{nil} @code{safe-local-variable} property. If one | 1827 | name a non-@code{nil} @code{safe-local-variable} property. If one |
| 1828 | gives it a @code{safe-local-variable} property of @code{t}, then one | 1828 | gives it a @code{safe-local-variable} property of @code{t}, then one |
| 1829 | can give the variable any file local value. One can also give any | 1829 | can give the variable any file local value. One can also give any |
| @@ -1838,9 +1838,9 @@ argument. | |||
| 1838 | variables listed in @code{ignored-local-variables}: | 1838 | variables listed in @code{ignored-local-variables}: |
| 1839 | 1839 | ||
| 1840 | @defvar ignored-local-variables | 1840 | @defvar ignored-local-variables |
| 1841 | This variable holds a list of variables that should not be | 1841 | This variable holds a list of variables that should not be given local |
| 1842 | set by a file's local variables list. Any value specified | 1842 | values by files. Any value specified for one of these variables is |
| 1843 | for one of these variables is ignored. | 1843 | ignored. |
| 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. | |||
| 1855 | normally asks for confirmation before handling it. | 1855 | normally asks for confirmation before handling it. |
| 1856 | 1856 | ||
| 1857 | @defopt enable-local-eval | 1857 | @defopt enable-local-eval |
| 1858 | This variable controls processing of @samp{Eval:} in local variables | 1858 | This variable controls processing of @samp{Eval:} in @samp{-*-} lines |
| 1859 | or local variables | ||
| 1859 | lists in files being visited. A value of @code{t} means process them | 1860 | lists in files being visited. A value of @code{t} means process them |
| 1860 | unconditionally; @code{nil} means ignore them; anything else means ask | 1861 | unconditionally; @code{nil} means ignore them; anything else means ask |
| 1861 | the user what to do for each file. The default value is @code{maybe}. | 1862 | the 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 |
| 1865 | could include functions to call. So Emacs discards all text | 1866 | could include functions to call. So Emacs discards all text |
| 1866 | properties from string values specified in a file's local variables | 1867 | properties from string values specified for file local variables. |
| 1867 | list. | ||
| 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 |