On (2013年09月10日 01:42), Chris Peterson wrote:
> On 9/9/13 6:58 AM, Dao wrote:
>> Probably historic reasons (e.g. somebody started adding lots of Java
>> files with 4-space indents and changing those wasn't considered
>> worthwhile) or consistency with
>> <http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-136091.html>?
>>  
>>
> 
> Google's Android Java style guide specifies 4-space indentation (even though 
> Google's C++ style guide uses 2 spaces, like Gecko C++). The Firefox for 
> Android team uses 4 spaces for consistency with Android.
> 
> 
> http://source.android.com/source/code-style.html
> 
> 
> chris
> 

Thank you. Historical reasons, then.
(Not really looking for a logical reason.)

I am getting the hang of emacs mode line.

/* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil;
c-basic-offset: 2 ; js-indent-level : 2 ; js-curly-indent-offset: 0 -*- */
/* vim: set ts=2 et sw=2 tw=80: */

seem to do the job.

I have not tested vim part.
We can probably omit js-curly-inent-offset here, but
for now, I am keeping it as a reminder.
It seems that js mode in Emacs worked with c-basic-offset a couple of years
ago, but today's js-mode (Javascript mode is an alias)
needs its own variables, I think.

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to