X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/29cb82362a4d833c1a153d84be01a89a4ba06fea..92f5479d9bc27b5289d352946a76ef585525a22e:/README.md diff --git a/README.md b/README.md index 2487c82b0..cbce9c37c 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,55 @@ -js2-mode -======== +About [![Build Status](https://travis-ci.org/mooz/js2-mode.svg?branch=master)](https://travis-ci.org/mooz/js2-mode) [![MELPA](https://melpa.org/packages/js2-mode-badge.svg)](https://melpa.org/#/js2-mode) +====== -An improved JavaScript mode for GNU Emacs. Forked from . +Improved JavaScript editing mode for GNU Emacs ([description here](http://elpa.gnu.org/packages/js2-mode.html)). -Install -======= +For some of the latest changes, see [latest user-visible changes](https://github.com/mooz/js2-mode/wiki/Latest-user-visible-changes). - $ git clone git://github.com/mooz/js2-mode.git - $ cd js2-mode - $ emacs --batch --eval '(byte-compile-file "js2-mode.el")' +Installation +====== -Then, place js2-mode.elc into your site-lisp directory. +The stable versions are hosted at [GNU ELPA](http://elpa.gnu.org/) +(M-x list-packages). -In you emacs config: +You can also install the latest development version from +[MELPA](https://melpa.org/#/getting-started). - (autoload 'js2-mode "js2-mode" nil t) - (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) +Emacs 22 and 23 +=============== -See for details. +This version requires Emacs 24 and `cl-lib` (either built-in or from GNU ELPA above). +For a backward compatible version, check out the branch +[emacs23](https://github.com/mooz/js2-mode/tree/emacs23). -Differences between original js2-mode.el -======================================== - -Support for abbreviated destructuring assignments -------------------------------------------------- - - let {a, b} = {a: 10, b: 20}; // Abbreviated (Not supported in original js2-mode.el) - let {a: a, b: b} = {a: 10, b: 20}; // Same as above (Supported in original js2-mode.el) - - (function ({responseText}) { /* */ })(xhr); // As the argument of function +Bugs +==== -Support for expression closure in property value ------------------------------------------------- +* See broken syntax highlighting and timer errors? Recently upgraded +Emacs from version 24.2 or earlier? - let worker = { - get age() 20, - get sex() "male", - fire: function () _fire() - }; +* Try +[reinstalling or byte-recompiling](https://github.com/mooz/js2-mode/issues/72) +the package. -Fixed the odd indentation of "else if" with no braces ------------------------------------------------------ +Please report problems at . -In original js2-mode.el, +Contributing +====== - if (foo) - return foo; - else if (bar) - return bar; // here +`js2-mode` is subject to the same +[copyright assignment](http://www.gnu.org/prep/maintain/html_node/Copyright-Papers.html) +policy as Emacs itself, `org-mode`, `CEDET` and other packages in +[GNU ELPA](http://elpa.gnu.org/packages/). -In this js2-mode.el, +Any +[legally significant](http://www.gnu.org/prep/maintain/html_node/Legally-Significant.html#Legally-Significant) +contributions can only be accepted after the author has completed their +paperwork. Please ask for the request form, and we'll send it to you. - if (foo) - return foo; - else if (bar) - return bar; // fixed +See Also +====== -Bugs -==== +Some third-party modes that use the generated syntax tree: -If you find problems, please report them to . +* [js2-refactor](https://github.com/magnars/js2-refactor.el) +* [skewer-mode](https://github.com/skeeto/skewer-mode)