diff options
| author | Richard M. Stallman | 2006-02-15 04:38:45 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-02-15 04:38:45 +0000 |
| commit | 3fdd8b9aa962853c8ed49ebdfc1bb1c0f666af97 (patch) | |
| tree | af3dce4bb43b6819065478630838e74e62836159 | |
| parent | 2b2ea6dbc5a2d5da046f9e294ce5b2b489e3fd29 (diff) | |
| download | emacs-3fdd8b9aa962853c8ed49ebdfc1bb1c0f666af97.tar.gz emacs-3fdd8b9aa962853c8ed49ebdfc1bb1c0f666af97.zip | |
(File Local Variables): Clarifications.
| -rw-r--r-- | lispref/variables.texi | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/lispref/variables.texi b/lispref/variables.texi index c3fe6cf6a23..f3e81c3ddd3 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi | |||
| @@ -1777,14 +1777,12 @@ visiting a file could take over your Emacs. Emacs takes several | |||
| 1777 | measures to prevent this. | 1777 | measures to prevent this. |
| 1778 | 1778 | ||
| 1779 | @cindex safe local variable | 1779 | @cindex safe local variable |
| 1780 | A variable can be marked as @dfn{safe} by setting its | 1780 | You can specify safe values for a variable with a |
| 1781 | @code{safe-local-variable} property. If the property is @code{t}, | 1781 | @code{safe-local-variable} property. If the property is @code{t}, |
| 1782 | setting that variable in a file is always considered safe, regardless | 1782 | setting that variable in a file is always considered safe, regardless |
| 1783 | of the value assigned to it. The @code{safe-local-variable} property | 1783 | of the value used. If the property is a function of one argument, |
| 1784 | can also be a function of one argument. In that case, Emacs considers | 1784 | then any value is safe if the function returns non-@code{nil} given |
| 1785 | it safe to give the variable a certain value if the function returns | 1785 | that value. Many commonly encountered file variables standardly have |
| 1786 | non-@code{nil} when given that value as argument. Many | ||
| 1787 | commonly-encountered file variables standardly have | ||
| 1788 | @code{safe-local-variable} properties, including @code{fill-column}, | 1786 | @code{safe-local-variable} properties, including @code{fill-column}, |
| 1789 | @code{fill-prefix}, and @code{indent-tabs-mode}. | 1787 | @code{fill-prefix}, and @code{indent-tabs-mode}. |
| 1790 | 1788 | ||
| @@ -1794,10 +1792,11 @@ safe. It is a list of cons cells @code{(@var{var} . @var{val})}, | |||
| 1794 | where @var{var} is a variable name and @var{val} is a value which is | 1792 | where @var{var} is a variable name and @var{val} is a value which is |
| 1795 | safe for that variable. | 1793 | safe for that variable. |
| 1796 | 1794 | ||
| 1797 | When Emacs asks the user whether or not to obey a set of file variable | 1795 | When Emacs asks the user whether or not to obey a set of file local |
| 1798 | specifications, the user can choose to mark them as safe. Doing so | 1796 | variable specifications, the user can choose to mark them as safe. |
| 1799 | adds those variable-value pairs to @code{safe-local-variable-values}, | 1797 | Doing so adds those variable/value pairs to |
| 1800 | and saves it to the user's custom file. | 1798 | @code{safe-local-variable-values}, and saves it to the user's custom |
| 1799 | file. | ||
| 1801 | @end defopt | 1800 | @end defopt |
| 1802 | 1801 | ||
| 1803 | @defun safe-local-variable-p sym val | 1802 | @defun safe-local-variable-p sym val |
| @@ -1825,8 +1824,8 @@ based on the above criteria. | |||
| 1825 | If a variable is risky, it will not be entered automatically into | 1824 | If a variable is risky, it will not be entered automatically into |
| 1826 | @code{safe-local-variable-values} as described above. Therefore, | 1825 | @code{safe-local-variable-values} as described above. Therefore, |
| 1827 | Emacs will always query before setting a risky variable, unless the | 1826 | Emacs will always query before setting a risky variable, unless the |
| 1828 | user explicitly allows it by editing @code{safe-local-variable-values} | 1827 | user explicitly allows the setting by customizing |
| 1829 | via Customize. | 1828 | @code{safe-local-variable-values} directly. |
| 1830 | 1829 | ||
| 1831 | @defvar ignored-local-variables | 1830 | @defvar ignored-local-variables |
| 1832 | This variable holds a list of variables that should not be given local | 1831 | This variable holds a list of variables that should not be given local |