[webkit-dev] Fwd: Point 3 of the WebKit Style Guidelines (indenting code inside namespaces in headers)

Evan Martin evan at chromium.org
Thu Oct 8 10:12:02 PDT 2009


On Wed, Oct 7, 2009 at 10:02 PM, Eric Seidel <eric at webkit.org> wrote:
>>>> I had thought that we resolved ages ago that we would no longer be
>>>> indenting code inside namespaces in header files, since that just results in
>>>> the entire class declaration being pointlessly indented.
>>>
>>> I like this change (even though it's hard to make Emacs play along).
>>
>> Is there a way to get Emacs to auto-indent this correctly? :'(

This (not indenting namespaces) is part of the Google C++ style.
I am still an amateur emacs user, but it looks like c-offsets-alist
with (innamespace . 0) is the setting you want.

See: http://google-styleguide.googlecode.com/svn/trunk/google-c-style.el

As for how to actually set that in C++-mode, your help is welcome.  :)


More information about the webkit-dev mailing list