Hi all,

I'm trying to get the following indenting style to work with emacs (NT Emacs to be specific):

public class blah
{

   public blah()
   {
       if (foo)
       {
               doSomething();
       }
   }
}

But instead, the braces after any block internal to the method start block are indented:
public class blah
{

   public blah()
   {
       if (foo)
           {
               doSomething();
           }
   }
}

I cannot figure out how to get the braces on the next line after if(foo) to NOT be indented.

Does anyone know which variable needs setting.
I've tried searching for this in the archives, but can't find the root of this problem.

Here are my settings in .emacs:
(defun a-java-mode-hook ()
 (setq tab-width 2)
 (setq indent-tabs-mode nil)
 (setq-default c-basic-offset 4)
)

(setq c-tab-always-indent t)
(setq c-indent-level 4)
(setq c-continued-brace-offset 4)
(setq c-brace-offset -4)
(setq c-brace-imaginary-offset 0)
(setq c-argdecl-indent 4)

However, I note that even if I run emacs with no .emacs, I get the same unwanted indentation of the internal block brace.

I've tried setting to k&r style, with no luck.

Thanks






_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to