]> code.delx.au - gnu-emacs-elpa/blob - packages/js2-mode-readme.txt
* admin/archive-contents.el: New file.
[gnu-emacs-elpa] / packages / js2-mode-readme.txt
1 This JavaScript editing mode supports:
2
3 - strict recognition of the Ecma-262 language standard
4 - support for most Rhino and SpiderMonkey extensions from 1.5 to 1.8
5 - parsing support for ECMAScript for XML (E4X, ECMA-357)
6 - accurate syntax highlighting using a recursive-descent parser
7 - on-the-fly reporting of syntax errors and strict-mode warnings
8 - undeclared-variable warnings using a configurable externs framework
9 - "bouncing" line indentation to choose among alternate indentation points
10 - smart line-wrapping within comments and strings
11 - code folding:
12 - show some or all function bodies as {...}
13 - show some or all block comments as /*...*/
14 - context-sensitive menu bar and popup menus
15 - code browsing using the `imenu' package
16 - typing helpers such as automatic insertion of matching braces/parens
17 - many customization options
18
19 To customize how it works:
20 M-x customize-group RET js2-mode RET
21
22 Notes:
23
24 This mode includes a port of Mozilla Rhino's scanner, parser and
25 symbol table. Ideally it should stay in sync with Rhino, keeping
26 `js2-mode' current as the EcmaScript language standard evolves.
27
28 Unlike cc-engine based language modes, js2-mode's line-indentation is not
29 customizable. It is a surprising amount of work to support customizable
30 indentation. The current compromise is that the tab key lets you cycle among
31 various likely indentation points, similar to the behavior of python-mode.
32
33 This mode does not yet work with "multi-mode" modes such as `mmm-mode'
34 and `mumamo', although it could be made to do so with some effort.
35 This means that `js2-mode' is currently only useful for editing JavaScript
36 files, and not for editing JavaScript within <script> tags or templates.