Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!mailrus!cornell!batcomputer!itsgw!imagine!Dave From: Dave Lawrence Newsgroups: comp.unix.wizards Subject: Re: Latest indent request Summary: ...moved from comp.unix.questions Message-ID: <2046@imagine.PAWL.RPI.EDU> Date: 10 Dec 88 15:58:23 GMT Sender: news@imagine.PAWL.RPI.EDU Reply-To: tale@pawl.rpi.edu Organization: The Octagon Room Lines: 40 peter@ficc.uu.net (Peter da Silva) wrote: >If I find a program that's got indentations less than a tabstop, it goes >through 'cb' first thing... and to hell with the pretty comments. I prefer the GNU Emacs way of doing things. o If I forgot a semicolon, I know immediately. o Closing braces, brackets or parentheses finds the matching pair. o TAB indents two spaces for each new level. This means: - At my fifth level of indentation, I've only lost ten characters. - At _c_b(1)'s fifth level, it's lost half of a line. fprintf's, long conditionals and other lengthy statements get split across lines that might not normally be that way. (Normally to me, at any rate.) I've run my code through _c_b(1) and all it does is indent things a huge amount. Maybe that's because that is all it supposed to do. Two spaces is enough for me to see the offset of a level. Additionally, _e_x_p_a_n_d(1) is pretty useless against C code from GNU Emacs as it contains precious few tabs. I'm a little confused as to what Peter means about "the pretty comments." Is that the programmer's comments or comments from the net? Programmer's commments (and those from the net) can be very helpful. Finally, as long as I'm at it, I'd like to register my preference for the following indentation form: main() { do { expr; expr; } while (); } Dave -- tale@rpitsmts.bitnet, tale%mts@rpitsgw.rpi.edu, tale@pawl.rpi.edu