[Top][All Lists]

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

Alter a built-in style (C++, want to change where "access labels" are pl

From: Eric Lilja
Subject: Alter a built-in style (C++, want to change where "access labels" are placed)
Date: 25 Nov 2006 13:45:58 -0800
User-agent: G2/1.0

Sorry for starting a new thread, hope this isn't bad netiquette.

My question: In my C++ mode hook I set the style to "ellemtel" with
(c-set-style "ellemtel")

I like how it indents except for where it place access labels (public,
private and protected in classes).
I want to change this behaviour but keep the rest. According to CC Mode
manual this seems very possible:
"If none of the built-in styles is appropriate, you'll probably want to
create a new style definition, possibly based on an existing style. To
do this, put the new style's settings into a list with the following
format - the list can then be passed as an argument to the function

I look at the provide sample .emacs file but I can't even make this
defconst compile and I don't know  what I should do when it does.

(defconst my-c++-style
    (c-offsets-alist . ((access-label . -)))) "My C++ Programming

Compiling file c:/cygwin/home/hivemind/.emacs at Sat Nov 25 22:38:59
.emacs:137:1:Error: End of file during parsing

And how do I "inherit" all settings from ellementel and override the
one as constructed in the defconst?

/ E

reply via email to

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