Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!rutgers!clyde!cuae2!ihnp4!inuxc!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uicsrd!guzzi From: guzzi@uicsrd.CSRD.UIUC.EDU Newsgroups: comp.emacs Subject: Re: Gnu C-mode indentation (and C++) Message-ID: <44000002@uicsrd> Date: Mon, 19-Jan-87 11:12:00 EST Article-I.D.: uicsrd.44000002 Posted: Mon Jan 19 11:12:00 1987 Date-Received: Fri, 23-Jan-87 21:16:19 EST References: <8370@watrose.UUCP> Lines: 27 Nf-ID: #R:watrose.UUCP:8370:uicsrd:44000002:000:965 Nf-From: uicsrd.CSRD.UIUC.EDU!guzzi Jan 19 10:12:00 1987 > /* Written Jan 15, 1987 by gjditchfield@watrose.UUCP in uicsrd:comp.emacs */ > /* ---------- "Gnu C-mode indentation (and C++)" ---------- */ > 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; > { |{ > } | } > main() | main() > { |{ > } | } > > /* End of text from uicsrd:comp.emacs */ I have noticed the same problem, and I attribute it to a bug in the C mode. If you place a ";" after the "}" that closes the function fn1, then the indentation works correctly. It doesn't seem to see the "}" as the end of the function, but needs a ";" to indicate the end. --Mark Guzzi University of Illinois at Urbana-Champaign ARPA: guzzi@uicsrd.csrd.uiuc.edu guzzi%uicsrd@uiuc.arpa CSNET: guzzi%uicsrd@uiuc USENET: {siesmo,ihnp4,cmcl2,pur-ee}!uiucdcs!uicsrd!guzzi