From: Kaushal Modi Date: Mon, 24 Jun 2019 22:42:20 +0000 (+0200) Subject: Add example for enabling minor modes in .dir-local.el X-Git-Tag: emacs-27.0.90~2259 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f70cdd4caa38602f908f106352f2135964e7bd92;p=emacs.git 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. --- 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. @example ((nil . ((indent-tabs-mode . t) - (fill-column . 80))) + (fill-column . 80) + (mode . auto-fill))) (c-mode . ((c-file-style . "BSD") (subdirs . nil))) ("src/imported" @@ -1370,13 +1371,16 @@ files in that subdirectory. @end example @noindent -This sets @samp{indent-tabs-mode} and @code{fill-column} for any file -in the directory tree, and the indentation style for any C source -file. The special @code{subdirs} element is not a variable, but a -special keyword which indicates that the C mode settings are only to -be applied in the current directory, not in any subdirectories. -Finally, it specifies a different @file{ChangeLog} file name for any -file in the @file{src/imported} subdirectory. +This sets the variables @samp{indent-tabs-mode} and @code{fill-column} +for any file in the directory tree, and the indentation style for any +C source file. The special @code{mode} element specifies the minor +mode to be enabled. So @code{(mode . auto-fill)} specifies that the +minor mode @code{auto-fill-mode} needs to be enabled. The special +@code{subdirs} element is not a variable, but a special keyword which +indicates that the C mode settings are only to be applied in the +current directory, not in any subdirectories. Finally, it specifies a +different @file{ChangeLog} file name for any file in the +@file{src/imported} subdirectory. If the @file{.dir-locals.el} file contains multiple different values for a variable using different mode names or directories, the values