aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/misc/cc-mode.texi28
1 files changed, 17 insertions, 11 deletions
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 0d8385ed968..3a93df59c68 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -2186,9 +2186,10 @@ that takes precedence is the one that appears latest in this list:
2186@item 2186@item
2187@table @asis 2187@table @asis
2188@item Style 2188@item Style
2189@itemx File Style@footnote{In earlier versions of @ccmode{}, a File Style setting took precedence over any other setting apart from a File Local Variable setting.}
2189@itemx Top-level command or ``customization interface'' 2190@itemx Top-level command or ``customization interface''
2190@itemx Hook 2191@itemx Hook
2191@itemx File Style 2192@itemx File Local Variable setting
2192@end table 2193@end table
2193@end itemize 2194@end itemize
2194 2195
@@ -2275,11 +2276,18 @@ in your @file{.emacs} file:
2275See @ref{Styles} for fuller details on using @ccmode{} styles and how 2276See @ref{Styles} for fuller details on using @ccmode{} styles and how
2276to create them. 2277to create them.
2277 2278
2279@item File Local Variable setting
2280A @dfn{file local variable setting} is a setting which applies to an
2281individual source file. You put this in a @dfn{local variables list},
2282a special block at the end of the source file (@pxref{Specifying File
2283Variables,,, @emacsman{}}).
2284
2278@item File Styles 2285@item File Styles
2279A @dfn{file style} is a rarely used variant of the ``style'' mechanism 2286A @dfn{file style} is a rarely used variant of the ``style'' mechanism
2280described above, which applies to an individual source file. To use 2287described above, which applies to an individual source file.
2281it, you set certain Emacs local variables in a special block at the 2288@xref{File Styles}. You use this by setting certain special variables
2282end of the source file. @xref{File Styles}. 2289in a local variables list (@pxref{Specifying File Variables,,,
2290@emacsman{}}).
2283 2291
2284@item Hooks with Styles 2292@item Hooks with Styles
2285For ultimate flexibility, you can use hooks and styles together. For 2293For ultimate flexibility, you can use hooks and styles together. For
@@ -2782,13 +2790,11 @@ made local to that buffer, even if
2782variable is virtually always non-@code{nil} anyhow, you're unlikely to 2790variable is virtually always non-@code{nil} anyhow, you're unlikely to
2783notice this effect.}. 2791notice this effect.}.
2784 2792
2785If you set any variables, including style variables, by the file local 2793If you set any variable by the file local variables mechanism, that
2786variables mechanism, these settings take priority over all other 2794setting takes priority over all other settings, even those in your
2787settings, even those in your mode hooks (@pxref{CC Hooks}). If you 2795mode hooks (@pxref{CC Hooks}). Any individual setting of a variable
2788use @code{c-file-style} or @code{c-file-offsets} and also explicitly 2796will override one made through @code{c-file-style} or
2789set a style variable in a local variable block, the explicit setting 2797@code{c-file-offsets}.
2790will take priority.
2791
2792@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2798@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2793@node Custom Filling and Breaking, Custom Auto-newlines, Config Basics, Top 2799@node Custom Filling and Breaking, Custom Auto-newlines, Config Basics, Top
2794@comment node-name, next, previous, up 2800@comment node-name, next, previous, up