help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Local Variables question: c-file-style and c-doc-comment-style


From: Daniel Rubin
Subject: Local Variables question: c-file-style and c-doc-comment-style
Date: Tue, 16 Jan 2007 09:13:38 +0100
User-agent: Thunderbird 1.5.0.4 (X11/20060516)

Hi all,

(I'm new here, so first of all: Best greetings to everyone!)

I have a problem concerning local variables in files (set by a
"Local Variables:" block at the end of a file).

Here's what I'm trying to achieve:

In C++ files, I'd like to set the indentation style (stroustrup),
apply some customizations (indentation inside namespace blocks),
and turn on a specific documentation comment style (javadoc).  I
currently do it like this:

// Local Variables:
// c-file-style:"stroustrup"
// c-file-offsets:((innamespace . 0))
// c-doc-comment-style:javadoc
// End:


Setting the indentation style and changing the indentation inside
namespaces works fine, but the doc-comment style is NOT set.

Looking at variable c-doc-comment-style, it tells me that it's
local within that buffer and having a setting different from the
global default:

c-doc-comment-style's value is ((java-mode . javadoc)
 (pike-mode . autodoc))

Local in buffer EadesLinSmythProgression.hpp; global value is ((c++-mode . javadoc)
 (java-mode . javadoc)
 (pike-mode . autodoc))


The documentation on c-file-style says that having a non-zero
value for this variable automatically makes all style variables
local, so I guess that's the problem.

How do I manage to set the doc-comment style?

Defining an own style (in my personal Emacs config) including that
setting is not an option, as other people (with other config
files) should be able to work with these files without nuking the
indentation.

emacs-version: 21.4.1
mode: c++-mode (CC Mode version 5.30.9) (Semantic version 2.0pre3)
OS: Linux (Fedora Core 4)

Have fun
----Daniel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]