]> code.delx.au - gnu-emacs-elpa/commitdiff
updated README.md
authormooz <stillpedant@gmail.com>
Tue, 28 Dec 2010 15:06:07 +0000 (00:06 +0900)
committermooz <stillpedant@gmail.com>
Tue, 28 Dec 2010 15:06:07 +0000 (00:06 +0900)
README.md

index 19cd7e1488eb4f239ee6ca8fd66bf97b61b3eed4..9ff2ee0cdf8b1becce390029810c054084e157cf 100644 (file)
--- a/README.md
+++ b/README.md
@@ -22,23 +22,6 @@ See <http://code.google.com/p/js2-mode/wiki/InstallationInstructions> for detail
 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
-
-Support for expression closure in property value
-------------------------------------------------
-
-    let worker = {
-        get age() 20,
-        get sex() "male",
-        fire: function () _fire()
-    };
-
 Supported more popular indentation style
 ----------------------------------------
 
@@ -65,7 +48,42 @@ When js2-consistent-level-indent-inner-bracket-p is nil
                        return validate(v);
                    });
 
-Fixed the odd indentation of "else if" with no braces
+Fixed ugly indentation with multi-line variable declaration
+-----------------------------------------------------------
+
+In original js2-mode.el,
+
+    var foo = 10,
+    bar = 20,
+    baz = 30;
+
+In this js2-mode.el,
+
+    var foo = 10,
+        bar = 20,
+        baz = 30;
+
+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
+
+    for (let [k, { name, age }] in Iterator(obj)) // nested
+        print(k, name, age);
+
+Support for expression closure in property value
+------------------------------------------------
+
+    let worker = {
+        get age() 20,
+        get sex() "male",
+        fire: function () _fire()
+    };
+
+Fixed odd indentation of "else if" with no braces
 -----------------------------------------------------
 
 In original js2-mode.el,