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

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

[elpa] master 2e7fdb3 012/110: Also highlight property lookups with the


From: Dmitry Gutov
Subject: [elpa] master 2e7fdb3 012/110: Also highlight property lookups with the same face
Date: Thu, 23 Jun 2016 01:12:53 +0000 (UTC)

branch: master
commit 2e7fdb3a1de4641fa22ec7b4d96f4d75e8307341
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Also highlight property lookups with the same face
    
    #272
---
 js2-mode.el |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/js2-mode.el b/js2-mode.el
index f38e1a5..01c97f9 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -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)



reply via email to

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