Latest indent request

Dave Dave
Sun Dec 11 01:58:23 AEST 1988


peter at 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 at rpitsmts.bitnet, tale%mts at rpitsgw.rpi.edu, tale at pawl.rpi.edu



More information about the Comp.unix.wizards mailing list