;; Basic indentation (setq c-basic-offset 4) (defun my-c-setup () (c-set-offset 'innamespace 0)) (add-hook 'c++-mode-hook 'my-c-setup)
To find out your current syntax state hit \C-c\C-s (crtl-c ctrl-s)
Refer:
http://www.emacswiki.org/emacs/IndentingC
http://google-styleguide.googlecode.com/svn/trunk/google-c-style.el
Thanks for posting. This was a big help.
ReplyDelete