Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!watnot!watrose!gjditchfield From: gjditchfield@watrose.UUCP Newsgroups: comp.emacs Subject: Gnu C-mode indentation (and C++) Message-ID: <8370@watrose.UUCP> Date: Thu, 15-Jan-87 14:37:37 EST Article-I.D.: watrose.8370 Posted: Thu Jan 15 14:37:37 1987 Date-Received: Fri, 16-Jan-87 04:57:01 EST Distribution: na Organization: U of Waterloo, Ontario Lines: 36 I'm using Gnu version 17.64.2 on a vax running BSD4.2. I can't quite get C-mode to indent the way I want. What I want is: What I get is: fn1(x) |fn1(x) int x; | int x; { |{ if (x) { | if (x) { x = 0; | x = 0; } | } } | } main() | main() { |{ int asdf = 1; | int asdf = 1; fn1( asdf); | fn1( asdf); } | } The scheme is that indentation increases after '{', and decreases after '}'. The problem is that indentation does not decrease after the '}' that closes a function (although it does decrease for '}'s inside functions). My .emacs file contains (setq c-indent-level 0) (setq c-brace-imaginary-offset 4) (setq c-continued-statement-offset 4) (setq c-argdecl-indent 4) (setq c-label-offset -2) What have I done wrong? By the way, does anyone out there have a C++ mode? (It would be just like C mode, except that ':' is used for things other than labels.) -- Glen Ditchfield {watmath,utzoo,ihnp4}!watrose!gjditchfield Dept of Computer Science, U of Waterloo (519) 885-1211 x6658 Waterloo, Ontario, Canada "Flame not, lest thou be singed" - Mr. Protocol