[asterisk-dev] [Code Review] Coding Guidelines, API naming convention, Line length limit

Steve Edwards asterisk.org at sedwards.com
Mon Mar 30 22:05:44 CDT 2009


On Tue, 31 Mar 2009, Tzafrir Cohen wrote:

> On Tue, Mar 24, 2009 at 11:06:30PM -0000, Mark Michelson wrote:
>
>> As another comment, I was just talking with Richard and realized
>> that different people use different-sized tabs, so to one developer,
>> a line may be 90 columns, but to another it may be more or less
>> depending on the indentation level of the line. Does this mean that
>> we need to mandate tab size?
>
> AFAIR Asterisk guidelines state a tab is 4 spaces.
>
> Add at the bottom:
>
> /* vim:ts=4: */
>
> (Is that right? And what's the Emacs equivalent?)

In ~/.emacs, add:

 	(setq default-tab-width 8)

Or at the bottom of the source file:

 	// Local variables:
 	// tab-width: 8
 	// End:

If you are stuck in the 1970's, then use:

 	/*
 	 * Local variables:
 	 * tab-width: 8
 	 * End:
 	 */

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-dev mailing list