diff options
| author | Alan Mackenzie | 2009-07-24 12:14:02 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2009-07-24 12:14:02 +0000 |
| commit | 22556bc5c72fa902e97619c8a2f8b2cde931561b (patch) | |
| tree | 1b5f3bb911fea7a4f3a6f4644e109d225b4c745e | |
| parent | 574b69d5fa18d3e70884398d1448c0944f11a6eb (diff) | |
| download | emacs-22556bc5c72fa902e97619c8a2f8b2cde931561b.tar.gz emacs-22556bc5c72fa902e97619c8a2f8b2cde931561b.zip | |
(Config Basics, File Styles): Document that at mode initialization, any
individual variable setting now takes precedence over one done via
c-file-style/c-file-offsets.
| -rw-r--r-- | doc/misc/cc-mode.texi | 28 |
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: | |||
| 2275 | See @ref{Styles} for fuller details on using @ccmode{} styles and how | 2276 | See @ref{Styles} for fuller details on using @ccmode{} styles and how |
| 2276 | to create them. | 2277 | to create them. |
| 2277 | 2278 | ||
| 2279 | @item File Local Variable setting | ||
| 2280 | A @dfn{file local variable setting} is a setting which applies to an | ||
| 2281 | individual source file. You put this in a @dfn{local variables list}, | ||
| 2282 | a special block at the end of the source file (@pxref{Specifying File | ||
| 2283 | Variables,,, @emacsman{}}). | ||
| 2284 | |||
| 2278 | @item File Styles | 2285 | @item File Styles |
| 2279 | A @dfn{file style} is a rarely used variant of the ``style'' mechanism | 2286 | A @dfn{file style} is a rarely used variant of the ``style'' mechanism |
| 2280 | described above, which applies to an individual source file. To use | 2287 | described above, which applies to an individual source file. |
| 2281 | it, you set certain Emacs local variables in a special block at the | 2288 | @xref{File Styles}. You use this by setting certain special variables |
| 2282 | end of the source file. @xref{File Styles}. | 2289 | in a local variables list (@pxref{Specifying File Variables,,, |
| 2290 | @emacsman{}}). | ||
| 2283 | 2291 | ||
| 2284 | @item Hooks with Styles | 2292 | @item Hooks with Styles |
| 2285 | For ultimate flexibility, you can use hooks and styles together. For | 2293 | For ultimate flexibility, you can use hooks and styles together. For |
| @@ -2782,13 +2790,11 @@ made local to that buffer, even if | |||
| 2782 | variable is virtually always non-@code{nil} anyhow, you're unlikely to | 2790 | variable is virtually always non-@code{nil} anyhow, you're unlikely to |
| 2783 | notice this effect.}. | 2791 | notice this effect.}. |
| 2784 | 2792 | ||
| 2785 | If you set any variables, including style variables, by the file local | 2793 | If you set any variable by the file local variables mechanism, that |
| 2786 | variables mechanism, these settings take priority over all other | 2794 | setting takes priority over all other settings, even those in your |
| 2787 | settings, even those in your mode hooks (@pxref{CC Hooks}). If you | 2795 | mode hooks (@pxref{CC Hooks}). Any individual setting of a variable |
| 2788 | use @code{c-file-style} or @code{c-file-offsets} and also explicitly | 2796 | will override one made through @code{c-file-style} or |
| 2789 | set a style variable in a local variable block, the explicit setting | 2797 | @code{c-file-offsets}. |
| 2790 | will 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 |