]> code.delx.au - gnu-emacs-elpa/commitdiff
Also highlight property lookups with the same face
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 13 Oct 2015 13:56:42 +0000 (16:56 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 13 Oct 2015 13:56:42 +0000 (16:56 +0300)
#272

js2-mode.el

index f38e1a5623b84a8b51bf16bc732b2884fb98979f..01c97f9ca9ae5d4a8a0f5295a99d2fe440d85336 100644 (file)
@@ -6758,6 +6758,8 @@ Shown at or above `js2-highlight-level' 3.")
                 (prop
                  (if (string-match js2-ecma-object-props prop-name)
                      'font-lock-constant-face))))))
+        (when (and (not face) prop-name)
+          (setq face 'js2-object-property))
         (when face
           (let ((pos (+ (js2-node-pos parent)  ; absolute
                         (js2-node-pos prop)))) ; relative
@@ -9973,9 +9975,9 @@ Returns an expression tree that includes PN, the parent node."
         (setq pn (js2-parse-tagged-template pn (make-js2-string-node :type tt))))
        (t
         (js2-unget-token)
-        (setq continue nil))))
-    (if (>= js2-highlight-level 2)
-        (js2-parse-highlight-member-expr-node pn))
+        (setq continue nil)))
+      (if (>= js2-highlight-level 2)
+          (js2-parse-highlight-member-expr-node pn)))
     pn))
 
 (defun js2-parse-tagged-template (tag-node tpl-node)