js3-mode

Homepage: https://github.com/tamzinblake/js3-mode

Author: Thom Blake

Updated:

Summary

An improved JavaScript editing mode

Commentary

This JavaScript editing mode supports:

 - the full JavaScript language through version 1.8
 - support for most Rhino and SpiderMonkey extensions from 1.5 to 1.8
 - accurate syntax highlighting using a recursive-descent parser
 - syntax-error and strict-mode warning reporting
 - smart line-wrapping within comments (Emacs 22+) and strings
 - code folding:
   - show some or all function bodies as {...}
   - show some or all block comments as /*...*/
 - context-sensitive menu bar and popup menus
 - code browsing using the `imenu' package
 - typing helpers (e.g. inserting matching braces/parens)
 - many customization options

It is only compatible with GNU Emacs versions 21 and higher (not XEmacs).

Installation:

 - put `js3.el' somewhere in your emacs load path
 - M-x byte-compile-file RET  RET
   Note:  it will refuse to run unless byte-compiled
 - add these lines to your .emacs file:
   (autoload 'js3-mode "js3" nil t)
   (add-to-list 'auto-mode-alist '("\\.js$" . js3-mode))

To customize how it works:
  M-x customize-group RET js3-mode RET

The variable `js3-mode-version' is a date stamp.  When you upgrade
to a newer version, you must byte-compile the file again.

Notes:

This mode is different in many ways from standard Emacs language editing
modes, inasmuch as it attempts to be more like an IDE.  If this drives
you crazy, it IS possible to customize it to be more like other Emacs
editing modes.  Please customize the group `js3-mode' to see all of the
configuration options.

Some of the functionality does not work in Emacs 21 -- upgrading to
Emacs 22 or higher will get you better results.  If you byte-compiled
js3.el with Emacs 21, you should re-compile it for Emacs 22.

This mode does not yet work with "multi-mode" modes such as mmm-mode
and mumamo, although it could possibly be made to do so with some effort.
This means that js3-mode is currently only useful for editing JavaScript
files, and not for editing JavaScript within