emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 7b2a4c8 214/271: Merge branch 'develop'


From: Jackson Ray Hamilton
Subject: [elpa] master 7b2a4c8 214/271: Merge branch 'develop'
Date: Thu, 05 Feb 2015 18:31:19 +0000

branch: master
commit 7b2a4c82a285a00e4df1c68784fb73048e796ded
Merge: 63e2590 a2ba1ef
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Merge branch 'develop'
---
 context-coloring.el           |    5 +++--
 test/context-coloring-test.el |   17 +++++++++++++++++
 test/fixtures/key-values.js   |    8 ++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/context-coloring.el b/context-coloring.el
index 00b4cfb..477bc12 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -4,7 +4,7 @@
 
 ;; Author: Jackson Ray Hamilton <address@hidden>
 ;; Keywords: context coloring syntax highlighting
-;; Version: 1.0.0
+;; Version: 2.0.1
 ;; Package-Requires: ((emacs "24") (js2-mode "20141228"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -255,7 +255,8 @@ END (exclusive) with the face corresponding to LEVEL."
 variable."
   (and (js2-name-node-p node)
        (let ((parent (js2-node-parent node)))
-         (not (or (js2-object-prop-node-p parent)
+         (not (or (and (js2-object-prop-node-p parent)
+                       (eq node (js2-object-prop-node-left parent)))
                   (and (js2-prop-get-node-p parent)
                        ;; For nested property lookup, the node on the left is a
                        ;; `js2-prop-get-node', so this always works.
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index 3fa7953..52a93fb 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -235,4 +235,21 @@ invoke when it is done."
    "./fixtures/property-lookup.js"
    (context-coloring-test-js-property-lookup)))
 
+(defun context-coloring-test-js-key-values ()
+  (context-coloring-test-assert-region-level 78 79 1))
+
+(ert-deftest-async context-coloring-test-js-mode-key-values (done)
+  (context-coloring-test-js-mode
+   "./fixtures/key-values.js"
+   (lambda (teardown)
+     (unwind-protect
+         (context-coloring-test-js-key-values)
+       (funcall teardown))
+     (funcall done))))
+
+(ert-deftest context-coloring-test-js2-mode-key-values ()
+  (context-coloring-test-js2-mode
+   "./fixtures/key-values.js"
+   (context-coloring-test-js-key-values)))
+
 (provide 'context-coloring-test)
diff --git a/test/fixtures/key-values.js b/test/fixtures/key-values.js
new file mode 100644
index 0000000..41bdedd
--- /dev/null
+++ b/test/fixtures/key-values.js
@@ -0,0 +1,8 @@
+(function () {
+    var a;
+    (function () {
+        return {
+            b: a
+        };
+    }());
+}());



reply via email to

[Prev in Thread] Current Thread [Next in Thread]