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

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

[elpa] master 58b7474 11/47: Don't color function calls as level 0.


From: Jackson Ray Hamilton
Subject: [elpa] master 58b7474 11/47: Don't color function calls as level 0.
Date: Mon, 18 May 2015 09:51:44 +0000

branch: master
commit 58b7474f6d6e80a3b91c782c23453d173588f878
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Don't color function calls as level 0.
---
 context-coloring.el           |    9 +--------
 test/context-coloring-test.el |   14 +++++++-------
 2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/context-coloring.el b/context-coloring.el
index 3a57b3f..0f65b57 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -376,7 +376,6 @@ generated by `js2-mode'."
              in-defun-p
              in-lambda-p
              in-let*-p
-             function-call-p
              defun-arglist
              defun-arg
              let-varlist
@@ -472,10 +471,7 @@ generated by `js2-mode'."
                ((string-match-p "\\`lambda\\'" child-0-string)
                 (setq in-lambda-p t))
                ((string-match-p "\\`let\\*\\'" child-0-string)
-                (setq in-let*-p t))
-               ;; Assume a global function call
-               (t
-                (setq function-call-p t)))))
+                (setq in-let*-p t)))))
             (when (or in-defun-p
                       in-lambda-p
                       in-let*-p)
@@ -489,9 +485,6 @@ generated by `js2-mode'."
                                               (scan-sexps token-pos 1)
                                               (context-coloring-scope-get-level
                                                (car scope-stack)))
-            (when function-call-p
-              (context-coloring-colorize-region child-0-pos child-0-end 0)
-              (setq function-call-p nil))
             (cond
              ((or in-defun-p
                   in-lambda-p)
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index 148ddac..c8a3532 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -1090,7 +1090,7 @@ see that function."
   (lambda ()
     (context-coloring-test-assert-coloring "
 111111 000 1111 111 111111111 1111
-  10 111 111 111 000011
+  11 111 111 111 000011
 
 0000 0 0 00
 
@@ -1101,16 +1101,16 @@ see that function."
   (lambda ()
     (context-coloring-test-assert-coloring "
 00000000 1111111 1111
-           10000000 11 2222222 2222
-                         200 22 12 2221 111 0 00")))
+           11111111 11 2222222 2222
+                         222 22 12 2221 111 0 00")))
 
 (context-coloring-test-deftest-emacs-lisp-mode quote
   (lambda ()
     (context-coloring-test-assert-coloring "
 (xxxxx x (x)
   (xx (xx x 111
-      100000 1 111 111
-      100000 1 1111000000 11 111 1 110 1 00001 10000 11 00001 1 100001111")))
+      111111 1 111 111
+      111111 1 1111111111 11 111 1 111 1 00001 10000 11 00001 1 100001111")))
 
 (context-coloring-test-deftest-emacs-lisp-mode comment
   (lambda ()
@@ -1118,7 +1118,7 @@ see that function."
     (context-coloring-test-assert-coloring "
 (xxxxx x ()
   (xx (x xxxxx-xxxx xx)   ;;;;;;;;;;
-      (0 xxxxx-xxxx xx))) ;;;;;;;;;;"))
+      11 00000-0000 11))) ;;;;;;;;;;"))
   :setup (lambda ()
            (setq context-coloring-syntactic-comments t)))
 
@@ -1134,7 +1134,7 @@ see that function."
   (lambda ()
     (context-coloring-test-assert-coloring "
 (xxxxx x ()
-  (0 0 1 11 11 111 11 1 111))")))
+  (x x 1 11 11 111 11 1 111))")))
 
 (context-coloring-test-deftest-emacs-lisp-mode let*
   (lambda ()



reply via email to

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