Path: utzoo!utgpu!water!watmath!clyde!att-cb!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hpda!hpsemc!bd From: bd@hpsemc.HP.COM (bob desinger) Newsgroups: comp.emacs Subject: Re: C-mode indentation weirdness Message-ID: <690007@hpsemc.HP.COM> Date: 28 Mar 88 19:29:57 GMT References: <1614@pinney.munsell.UUCP> Organization: HP SEMC, Cupertino, CA Lines: 21 Paul Czarnecki (pz@munsell.UUCP) asks: > Why does Gnu emacs indent this C code like this? RMS likes it that way. It looks weird to my taste, too, but then he probably hates my style so we're even. > Is there a coding style or emacs variable that I need to change? Here are the relevant lines from my .emacs. I sure wish I remembered where I got them from. (An info-node somewhere?) ;; C-mode (kernel style) (setq c-tab-always-indent nil) ; \t inserts itself if point is at midline (setq c-indent-level 8) ; \t indents this much (setq c-continued-statement-offset 8) ; indent "then" clauses, etc. (setq c-brace-offset -8) ; begin hanging braces under keyword (setq c-argdecl-indent 8) ; function arg decls indented this much (setq c-label-offset -8) ; "case" lines inside of switches -- bd