wrt your first question, here is what I do in my .emacs file
to accomplish it:

(defun my-java-mode-hook()
  "Hook for running Java file..."
  (message " Loading my-java-hook...")
   ;;don't indent braces
  (c-set-offset 'substatement-open 0)
  (c-set-offset 'statement-case-open 0)
  (c-set-offset 'case-label '+))

(add-hook 'java-mode-hook     'my-java-mode-hook)

amilanov wrote:

> Hi,
>
> I've got two questions related to indentation and I couldn't find answers
> in the JDE FAQ.
>
> My first question is related to the way Emacs indents the curly bracket {
> for the beginning of a new statement block.
> The way it is now:
>
> if (bla bla)
>     {
>         // bla bla
>     }
>
> I'd like to see:
>
> if (bla bla)
> {
>     // bla bla
> }
>
> Is this doable?
>
> The second question is related to the way Emacs indents javadoc comments.
> If I select a region and then indent it, the javadoc comments in it are
> arranged in a strange way, something like:
>
> /**
>     *
>     *
>     */
>
> However, if I go over the comments and press Tab in each line, I get
> something like:
>
> /**
>  *
>  *
>  */
>
> The latter is what I consider to be correct (it appears in all our source
> files).
>
> I've thought that indenting a region and pressing Tab in each region line
> are equivalent, but apparently they're not.
>
> I use Emacs 20.4.1 on Windows 95 with JDE 2.1.5.
>
> Thanks,
>
> Alex


begin:          vcard
fn:             Rich Johns
n:              Johns;Rich
org:            Trajecta
email;internet: [EMAIL PROTECTED]
title:          Software Designer
note:           [EMAIL PROTECTED]
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:        2.1
end:            vcard

Reply via email to