diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/custom.texi | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index b07362f3cea..3fd655048b4 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -1375,6 +1375,28 @@ be applied in the current directory, not in any subdirectories. | |||
| 1375 | Finally, it specifies a different @file{ChangeLog} file name for any | 1375 | Finally, it specifies a different @file{ChangeLog} file name for any |
| 1376 | file in the @file{src/imported} subdirectory. | 1376 | file in the @file{src/imported} subdirectory. |
| 1377 | 1377 | ||
| 1378 | If the @file{.dir-locals.el} file contains multiple different values | ||
| 1379 | for a variable using different mode names or directories, the values | ||
| 1380 | will be applied in an order such that the values for more specific | ||
| 1381 | modes take priority over more generic modes. Values specified under a | ||
| 1382 | directory have even more priority. For example: | ||
| 1383 | |||
| 1384 | @example | ||
| 1385 | ((nil . ((fill-column . 40))) | ||
| 1386 | (c-mode . ((fill-column . 50))) | ||
| 1387 | (prog-mode . ((fill-column . 60))) | ||
| 1388 | ("narrow-files" . ((nil . ((fill-column . 20)))))) | ||
| 1389 | @end example | ||
| 1390 | |||
| 1391 | Files that use @code{c-mode} also match @code{prog-mode} because the | ||
| 1392 | former inherits from the latter. The value used for | ||
| 1393 | @code{fill-column} in C files will however be @code{50} because the | ||
| 1394 | mode name is more specific than @code{prog-mode}. Files using other | ||
| 1395 | modes inheriting from @code{prog-mode} will use @code{60}. Any file | ||
| 1396 | under the directory @file{narrow-files} will use the value @code{20} | ||
| 1397 | even if they use @code{c-mode} because directory entries have priority | ||
| 1398 | over mode entries. | ||
| 1399 | |||
| 1378 | You can specify the variables @code{mode}, @code{eval}, and | 1400 | You can specify the variables @code{mode}, @code{eval}, and |
| 1379 | @code{unibyte} in your @file{.dir-locals.el}, and they have the same | 1401 | @code{unibyte} in your @file{.dir-locals.el}, and they have the same |
| 1380 | meanings as they would have in file local variables. @code{coding} | 1402 | meanings as they would have in file local variables. @code{coding} |