diff options
| author | Kaushal Modi | 2019-06-25 00:42:20 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-25 00:46:20 +0200 |
| commit | f70cdd4caa38602f908f106352f2135964e7bd92 (patch) | |
| tree | 541d620d4ec359567dab171e290305f09a5eb418 | |
| parent | 6e2708694140cd3b4ff6aeb39534c4704d6d4e23 (diff) | |
| download | emacs-f70cdd4caa38602f908f106352f2135964e7bd92.tar.gz emacs-f70cdd4caa38602f908f106352f2135964e7bd92.zip | |
Add example for enabling minor modes in .dir-local.el
* doc/emacs/custom.texi (Directory Variables): Add an example that
shows how a minor mode can be enabled in a .dir-local.el (Bug#27639).
Clarify that indent-tabs-mode is not a minor mode.
| -rw-r--r-- | doc/emacs/custom.texi | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 982cea1f213..fae5433f877 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -1361,7 +1361,8 @@ files in that subdirectory. | |||
| 1361 | 1361 | ||
| 1362 | @example | 1362 | @example |
| 1363 | ((nil . ((indent-tabs-mode . t) | 1363 | ((nil . ((indent-tabs-mode . t) |
| 1364 | (fill-column . 80))) | 1364 | (fill-column . 80) |
| 1365 | (mode . auto-fill))) | ||
| 1365 | (c-mode . ((c-file-style . "BSD") | 1366 | (c-mode . ((c-file-style . "BSD") |
| 1366 | (subdirs . nil))) | 1367 | (subdirs . nil))) |
| 1367 | ("src/imported" | 1368 | ("src/imported" |
| @@ -1370,13 +1371,16 @@ files in that subdirectory. | |||
| 1370 | @end example | 1371 | @end example |
| 1371 | 1372 | ||
| 1372 | @noindent | 1373 | @noindent |
| 1373 | This sets @samp{indent-tabs-mode} and @code{fill-column} for any file | 1374 | This sets the variables @samp{indent-tabs-mode} and @code{fill-column} |
| 1374 | in the directory tree, and the indentation style for any C source | 1375 | for any file in the directory tree, and the indentation style for any |
| 1375 | file. The special @code{subdirs} element is not a variable, but a | 1376 | C source file. The special @code{mode} element specifies the minor |
| 1376 | special keyword which indicates that the C mode settings are only to | 1377 | mode to be enabled. So @code{(mode . auto-fill)} specifies that the |
| 1377 | be applied in the current directory, not in any subdirectories. | 1378 | minor mode @code{auto-fill-mode} needs to be enabled. The special |
| 1378 | Finally, it specifies a different @file{ChangeLog} file name for any | 1379 | @code{subdirs} element is not a variable, but a special keyword which |
| 1379 | file in the @file{src/imported} subdirectory. | 1380 | indicates that the C mode settings are only to be applied in the |
| 1381 | current directory, not in any subdirectories. Finally, it specifies a | ||
| 1382 | different @file{ChangeLog} file name for any file in the | ||
| 1383 | @file{src/imported} subdirectory. | ||
| 1380 | 1384 | ||
| 1381 | If the @file{.dir-locals.el} file contains multiple different values | 1385 | If the @file{.dir-locals.el} file contains multiple different values |
| 1382 | for a variable using different mode names or directories, the values | 1386 | for a variable using different mode names or directories, the values |