From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Cc: steve.yegge@gmail.com
Subject: Re: another javascript mode
Date: Thu, 10 Apr 2008 09:21:49 -0500 [thread overview]
Message-ID: <86bq4h6b9e.fsf@lifelogs.com> (raw)
In-Reply-To: 200804091804.m39I4Pbt025532@sallyv1.ics.uci.edu
On Wed, 09 Apr 2008 11:04:25 -0700 Dan Nicolaescu <dann@ics.uci.edu> 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
next prev parent reply other threads:[~2008-04-10 14:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-09 18:04 another javascript mode Dan Nicolaescu
2008-04-09 18:23 ` Lennart Borgman (gmail)
2008-04-09 19:00 ` Dan Nicolaescu
2008-04-09 20:46 ` Sebastian Rose
2008-04-09 22:41 ` Lennart Borgman (gmail)
2008-04-09 21:56 ` Sebastian Rose
2008-04-09 22:40 ` Johan Bockgård
2008-04-10 14:21 ` Ted Zlatanov [this message]
2008-04-11 4:14 ` Steve Yegge
2008-04-11 16:01 ` Dan Nicolaescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86bq4h6b9e.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=emacs-devel@gnu.org \
--cc=steve.yegge@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.