I realize that it is actually cc-mode that handles indentation, but I'm 
hoping someone here can help me even though this is slightly off 
topic.  Since upgrading to emacs 21.1, braces on the line after an "if", 
"else", "try", or "catch" are now indented:

desired way(worked with emacs 20.7.1)
if ( foo )
{
     blah();
}

new way
if ( foo )
     {
         blah();
     }

I've been playing around with my java-style all morning, but I just can't 
get it to work.  Here is my style:

(defconst av-java-style
   '((c-basic-offset . 4)
     (c-comment-only-line-offset 0 . 0)
     (c-offsets-alist
      (inline-open . 0)
      (statement-block-intro . +)
      (block-open . -)
      (topmost-intro-cont . +)
      (knr-argdecl-intro . +)
      (substatement-open . 0)
      (case-label . 2)
      (statement-case-intro . 2)
      (label . 0)
      (statement-case-open . +)
      (statement-cont . +)
      (arglist-intro . +)
      (arglist-close . c-lineup-arglist)
      (access-label . 0)))
   "My Java style, according to the My Java style guide.")


---------------------------
Jeff Smith
[EMAIL PROTECTED]
BEA Systems, Inc.
---------------------------

Reply via email to