aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaushal Modi2019-06-25 00:42:20 +0200
committerLars Ingebrigtsen2019-06-25 00:46:20 +0200
commitf70cdd4caa38602f908f106352f2135964e7bd92 (patch)
tree541d620d4ec359567dab171e290305f09a5eb418
parent6e2708694140cd3b4ff6aeb39534c4704d6d4e23 (diff)
downloademacs-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.texi20
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
1373This sets @samp{indent-tabs-mode} and @code{fill-column} for any file 1374This sets the variables @samp{indent-tabs-mode} and @code{fill-column}
1374in the directory tree, and the indentation style for any C source 1375for any file in the directory tree, and the indentation style for any
1375file. The special @code{subdirs} element is not a variable, but a 1376C source file. The special @code{mode} element specifies the minor
1376special keyword which indicates that the C mode settings are only to 1377mode to be enabled. So @code{(mode . auto-fill)} specifies that the
1377be applied in the current directory, not in any subdirectories. 1378minor mode @code{auto-fill-mode} needs to be enabled. The special
1378Finally, it specifies a different @file{ChangeLog} file name for any 1379@code{subdirs} element is not a variable, but a special keyword which
1379file in the @file{src/imported} subdirectory. 1380indicates that the C mode settings are only to be applied in the
1381current directory, not in any subdirectories. Finally, it specifies a
1382different @file{ChangeLog} file name for any file in the
1383@file{src/imported} subdirectory.
1380 1384
1381If the @file{.dir-locals.el} file contains multiple different values 1385If the @file{.dir-locals.el} file contains multiple different values
1382for a variable using different mode names or directories, the values 1386for a variable using different mode names or directories, the values