Wireshark-dev: Re: [Wireshark-dev] modelines
From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Wed, 28 Sep 2011 16:57:16 -0400
Chris Maynard wrote:
Stephen Fisher <steve@...> writes:

Since I started coding for Wireshark in 2006, the convention wisdom (as I understood it) has always been to stick with the formatting method that the file already has, whatever that may be.

Right, but what if there's a file already consistently using tabs throughout,
but with no current modelines?  (Example: packet-igmp.c)  What value to use for
the tabstop, for example?  It would seem that tabstop=8 is preferred, judging by
the number of epan/dissectors/packet-*.c files using that value (54) as opposed
to using tabstop=4 (3); however, I am wondering if 8 is simply used more than 4
because that's what the Wireshark modeline generation tool happens to default
to, so I just wanted to check if that was in fact the recommendation or if it
was just a somewhat arbitrary choice, and if arbitrary, then what the actual
recommendation would be.

I'll argue that *tab*stops should be 8 until someone shows me how to tell all the various terminal programs I end up using that the file I'm currently looking at (in 'less' or 'grep' or plain old 'cat') that the file in question is using an alternative tabstop. (Or until I'm blue in the face or dead or whatever ;-).)

(I don't have strong opinions on the shiftwidth/indentsize. But tabstops should be 8. At least in my opinion ;-).)