emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another javascript mode


From: Ted Zlatanov
Subject: Re: another javascript mode
Date: Thu, 10 Apr 2008 09:21:49 -0500
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

On Wed, 09 Apr 2008 11:04:25 -0700 Dan Nicolaescu <address@hidden> wrote: 

DN> A new javascript mode was posted here:

DN> http://code.google.com/p/js2-mode/

DN> We were looking to include a mode for javascript, from the description
DN> this mode seems to be a better candidate for inclusion.
DN> Can someone that uses javascript check it out please?

cc-ing Steve Yegge in case he wants to comment...

I do Javascript work and installed js2-mode when it was released.  My
initial comments are on
http://code.google.com/p/js2-mode/wiki/Discussion and the author
addressed them.

- the built-in parser is good at catching most common mistakes,
  especially leaving a trailing comma in a list (very annoying since
  some browsers accept it).  This is really, really nice.

- the indentation guessing (every TAB indents to a different possible
  offset) is annoying to me, even with the patch to require two TABs
  after the first one.  It's inconsistent with what Emacs does in all
  other modes, IMO.  I'd rather take the first guess (and improve the
  code. if it's no good) and invoke subsequent guesses with a secondary
  indent command.

- the pre-compilation requirement is a bit annoying.  I understand the
  idea, but wish it could be automatic.

- it can't currently integrate with mmm-mode, I often need to switch
  from HTML to Javascript to CSS in a typical web page.  Steve Yegge
  says it's not easy in the discussion URL above.  Someone suggested
  mumamo, but I haven't tried that yet.

- auto-update won't be too important if it becomes part of Emacs

Overall, I'd rather use js2-mode than anything else I've tried (and I've
tried at least 4 Javascript modes), primarily for the error highlighting
and the good indentation.  I hope it can go into Emacs.

Ted





reply via email to

[Prev in Thread] Current Thread [Next in Thread]