[comp.emacs] GNU question

rjf@LECTROID.SW.STRATUS.COM (Richard Frongillo) (02/21/91)

Hello,

I need some help!  I am working with GNU Emacs version 18.55 and am
trying to have a close brace ('}') for a switch statement indent the
way I'd like it.

That is, I would like the following indentation automatically:

     switch (i) {
          case 3 :
               ...;
     }

instead of:

     switch (i) {
          case 3 :
               ...;
          }

Currently, if I put an open brace in the text of the 'case', then the
close braces line up as I expect them to.

     switch (i) {
          case 3    : {
               ...;
          }
     }

However, I never use an open brace on the 'case' line.

Here are my c-mode bindings:

     (setq c-tab-always-indent nil
	   c-indent-level 5
	   c-continued-statement-offset 5
	   c-label-offset 0
	   c-brace-offset -5
	   c-mode-hook
	   '(lambda () (progn (setq tab-width 5)
			      (setq indent-tabs-mode nil)))
	   require-final-newline 0)

If anyone has a solution to this please let me know.  E-mail can be
sent to rjf@stratus.com.  Thanks.

                         RRRRRRRRiiiiiiiiiiicccccccccccccchhhhhhhhhhhhhhhhh