Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ll-xn!adelie!munsell!pz From: pz@munsell.UUCP (Paul Czarnecki) Newsgroups: comp.emacs Subject: Re: C-mode indentation weirdness Message-ID: <1630@pinney.munsell.UUCP> Date: 1 Apr 88 02:23:29 GMT References: <1614@pinney.munsell.UUCP> <690007@hpsemc.HP.COM> Reply-To: pz@pinney.UUCP (Paul Czarnecki) Organization: Eikonix Corp., Bedford, MA Lines: 53 In article <690007@hpsemc.HP.COM> bd@hpsemc.HP.COM (bob desinger) writes: >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. NO no no... It is buggy. Try this: switch (c) { case foo(): i = 7; break; case bar(): j = 8; break; case quux(): k = 9; break; default: l = 10; break; } switch (c) { case 'a': i = 7; break; case 'b': j = 8; break; case 8: k = 9; break; default: l = 10; break; } The problem is with the function calls on the case line. Both of the above code fragments were indented in the same emacs. I'm running 18.41. I've been told it was fixed in 18.50. I've been promised the fixes but I haven't received them yet. (And for those of you who scream, "You can't have function calls on the case line!", you are only half wrong. Remember that MACROS can look like function calls.) pZ -- Paul Czarnecki -- Spam, spam, spam, Usenet, and spam {{harvard,ll-xn}!adelie,{decvax,allegra,talcott}!encore}!munsell!pz