[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
java mode indentation
From: |
John I. Seltzer |
Subject: |
java mode indentation |
Date: |
Tue, 07 Jun 2005 15:27:17 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- java mode indentation,
John I. Seltzer <=