diff options
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 41 | ||||
| -rw-r--r-- | etc/NEWS | 6 |
3 files changed, 46 insertions, 6 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index b4cb1c5b052..938fe1572ac 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-04-15 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * custom.texi (Specifying File Variables, Directory Variables): | ||
| 4 | Document new commands for manipulating local variable lists. | ||
| 5 | |||
| 1 | 2010-04-09 Glenn Morris <rgm@gnu.org> | 6 | 2010-04-09 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * trouble.texi (Contributing): Add cindex entry. | 8 | * trouble.texi (Contributing): Add cindex entry. |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index f0faec4d40c..a8bba419c25 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | @c This is part of the Emacs manual. | 1 | @c This is part of the Emacs manual. |
| 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, | 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, |
| 3 | @c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | @c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
| 4 | @c Free Software Foundation, Inc. | ||
| 4 | @c See file emacs.texi for copying conditions. | 5 | @c See file emacs.texi for copying conditions. |
| 5 | @node Customization, Quitting, Amusements, Top | 6 | @node Customization, Quitting, Amusements, Top |
| 6 | @chapter Customization | 7 | @chapter Customization |
| @@ -1086,11 +1087,22 @@ You can specify any number of variable/value pairs in this way, each | |||
| 1086 | pair with a colon and semicolon as shown above. The special | 1087 | pair with a colon and semicolon as shown above. The special |
| 1087 | variable/value pair @code{mode: @var{modename};}, if present, | 1088 | variable/value pair @code{mode: @var{modename};}, if present, |
| 1088 | specifies a major or minor mode; if you use this to specify a major | 1089 | specifies a major or minor mode; if you use this to specify a major |
| 1089 | mode, it should come first in the line. The @var{value}s are are used | 1090 | mode, it should come first in the line. The @var{value}s are used |
| 1090 | literally, and not evaluated. | 1091 | literally, and not evaluated. |
| 1091 | 1092 | ||
| 1092 | Here is an example that specifies Lisp mode and sets two variables | 1093 | @findex add-file-local-variable-prop-line |
| 1093 | with numeric values: | 1094 | @findex delete-file-local-variable-prop-line |
| 1095 | @findex copy-dir-locals-to-file-locals-prop-line | ||
| 1096 | You can use the command @code{add-file-local-variable-prop-line} | ||
| 1097 | instead of adding entries by hand. It prompts for a variable | ||
| 1098 | and value, and adds them to the first line in the appropriate way. | ||
| 1099 | The command @code{delete-file-local-variable-prop-line} deletes a | ||
| 1100 | variable from the line. The command | ||
| 1101 | @code{copy-dir-locals-to-file-locals-prop-line} copies directory-local | ||
| 1102 | variables (@pxref{Directory Variables}) to the first line. | ||
| 1103 | |||
| 1104 | Here is an example first line that specifies Lisp mode and sets two | ||
| 1105 | variables with numeric values: | ||
| 1094 | 1106 | ||
| 1095 | @smallexample | 1107 | @smallexample |
| 1096 | ;; -*- mode: Lisp; fill-column: 75; comment-column: 50; -*- | 1108 | ;; -*- mode: Lisp; fill-column: 75; comment-column: 50; -*- |
| @@ -1144,6 +1156,17 @@ won't confuse other programs that the file is intended for. The | |||
| 1144 | example above is for the C programming language, where comment lines | 1156 | example above is for the C programming language, where comment lines |
| 1145 | start with @samp{/*} and end with @samp{*/}. | 1157 | start with @samp{/*} and end with @samp{*/}. |
| 1146 | 1158 | ||
| 1159 | @findex add-file-local-variable | ||
| 1160 | @findex delete-file-local-variable | ||
| 1161 | @findex copy-dir-locals-to-file-locals | ||
| 1162 | You can construct the local variables list yourself, or use the | ||
| 1163 | command @code{add-file-local-variable}. This prompts for a variable | ||
| 1164 | and value, and adds them to the list. If necessary, it also adds the | ||
| 1165 | start and end markers. The command @code{delete-file-local-variable} | ||
| 1166 | deletes a variable from the list. The command | ||
| 1167 | @code{copy-dir-locals-to-file-locals} copies directory-local variables | ||
| 1168 | (@pxref{Directory Variables}) to the list. | ||
| 1169 | |||
| 1147 | As with the @samp{-*-} line, the variables in a local variables list | 1170 | As with the @samp{-*-} line, the variables in a local variables list |
| 1148 | are used literally, and are not evaluated first. If you want to split | 1171 | are used literally, and are not evaluated first. If you want to split |
| 1149 | a long string across multiple lines of the file, you can use | 1172 | a long string across multiple lines of the file, you can use |
| @@ -1323,6 +1346,16 @@ style for any C or Java source file. Finally, it specifies a different | |||
| 1323 | subdirectory of the directory where you put the @file{.dir-locals.el} | 1346 | subdirectory of the directory where you put the @file{.dir-locals.el} |
| 1324 | file. | 1347 | file. |
| 1325 | 1348 | ||
| 1349 | @findex add-dir-local-variable | ||
| 1350 | @findex delete-dir-local-variable | ||
| 1351 | @findex copy-file-locals-to-dir-locals | ||
| 1352 | You can edit the @file{.dir-locals.el} file by hand, or use the | ||
| 1353 | command @code{add-dir-local-variable}. This prompts for a mode (or | ||
| 1354 | subdirectory), variable and value, and adds an entry to the file. | ||
| 1355 | The command @code{delete-dir-local-variable} deletes an entry. The | ||
| 1356 | command @code{copy-file-locals-to-dir-locals} copies file local | ||
| 1357 | variables (@pxref{File Variables}) to the @file{.dir-locals.el} file. | ||
| 1358 | |||
| 1326 | @findex dir-locals-set-class-variables | 1359 | @findex dir-locals-set-class-variables |
| 1327 | @findex dir-locals-set-directory-class | 1360 | @findex dir-locals-set-directory-class |
| 1328 | Another method of specifying directory-local variables is to explicitly | 1361 | Another method of specifying directory-local variables is to explicitly |
| @@ -95,12 +95,14 @@ with `set-process-query-on-exit-flag'. | |||
| 95 | unconditionally. The previous behavior, toggling the mode, was | 95 | unconditionally. The previous behavior, toggling the mode, was |
| 96 | neither reliable nor generally desirable. | 96 | neither reliable nor generally desirable. |
| 97 | 97 | ||
| 98 | *** New commands for adding and removing file-local variables: | 98 | +++ |
| 99 | *** There are new commands for adding and removing file-local variables: | ||
| 99 | `add-file-local-variable', `delete-file-local-variable', | 100 | `add-file-local-variable', `delete-file-local-variable', |
| 100 | `add-file-local-variable-prop-line', and | 101 | `add-file-local-variable-prop-line', and |
| 101 | `delete-file-local-variable-prop-line'. | 102 | `delete-file-local-variable-prop-line'. |
| 102 | 103 | ||
| 103 | *** New commands for adding and removing directory-local variables, | 104 | +++ |
| 105 | *** There are new commands for adding and removing directory-local variables, | ||
| 104 | and copying them to and from file-local variable lists: | 106 | and copying them to and from file-local variable lists: |
| 105 | `add-dir-local-variable', `delete-dir-local-variable', | 107 | `add-dir-local-variable', `delete-dir-local-variable', |
| 106 | `copy-dir-locals-to-file-locals', | 108 | `copy-dir-locals-to-file-locals', |