[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Good JavaScript c-style-mode?
From: |
Joost Diepenmaat |
Subject: |
Re: Good JavaScript c-style-mode? |
Date: |
Mon, 22 Sep 2008 23:00:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
jrwats <jrwats@gmail.com> writes:
> Does anyone know a good c-style-mode or what variables I need to
> change to fix the below indentation:
> AClass = {}
>
> AClass.function1 = function(){
> alert('function1');
> }
>
> Aclass.function2 = function(){
> alert('function2');
> }
>
> The desired indentation would be:
> AClass = {}
>
> AClass.function1 = function(){
> alert('function1');
> }
>
> Aclass.function2 = function(){
> alert('function2');
> }
you want a real javascript mode. as far as indentation goes, Karl
Landstrom's mode is probably the best (link to my patched version):
http://joost.zeekat.nl/wp-content/javascript.el
outside of indentation, js2 mode is probably better:
http://code.google.com/p/js2-mode/
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/