[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7ac8db6 012/271: Fix a bug where strings were matched.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 7ac8db6 012/271: Fix a bug where strings were matched. |
Date: |
Thu, 05 Feb 2015 18:29:25 +0000 |
branch: master
commit 7ac8db63ad47f5c55c3617bf9befe2daf3f59648
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Fix a bug where strings were matched.
---
.gitignore | 2 +-
context-coloring.el | 7 ++++++-
scripts/tokenizer.js | 3 ++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index 016d3b1..c531d98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-*.elc
\ No newline at end of file
+*.elc
diff --git a/context-coloring.el b/context-coloring.el
index 0a72429..3d88661 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -111,15 +111,20 @@ Return the name of the temporary file."
(define-minor-mode context-coloring-mode
"Context-based code coloring for JavaScript, inspired by Douglas Crockford."
nil " Context" nil
+ (make-local-variable 'jit-lock-stealth-time)
(make-local-variable 'jit-lock-chunk-size)
(make-local-variable 'jit-lock-contextually)
(if (not context-coloring-mode)
(progn
+ (setq jit-lock-stealth-time nil)
(setq jit-lock-chunk-size 500)
(setq jit-lock-contextually `syntax-driven)
- (jit-lock-unregister 'context-coloring-fontify-region))
+ (jit-lock-unregister 'context-coloring-fontify-region)
+ (jit-lock-register 'font-lock-fontify-region))
+ (setq jit-lock-stealth-time 1)
(setq jit-lock-chunk-size 536870911)
(setq jit-lock-contextually nil)
+ (jit-lock-unregister 'font-lock-fontify-region)
(jit-lock-register 'context-coloring-fontify-region)))
;;;###autoload
diff --git a/scripts/tokenizer.js b/scripts/tokenizer.js
index 0e799d1..b7b3268 100644
--- a/scripts/tokenizer.js
+++ b/scripts/tokenizer.js
@@ -64,7 +64,8 @@ process.stdin.on('end', function () {
// Globality is not indicated by origin function.
if (token.kind !== 'function' &&
- data.global.indexOf(token.string) > -1) {
+ (token.identifier &&
+ data.global.indexOf(token.string) > -1)) {
level = 0;
} else {
level = origin.function.level;
- [elpa] master aaf199e 006/271: Fix global wraparound., (continued)
- [elpa] master aaf199e 006/271: Fix global wraparound., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 809d48b 020/271: Minor tweaks., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 98df7db 010/271: Optimize cli a little bit., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 5fd312b 002/271: More planning and research., Jackson Ray Hamilton, 2015/02/05
- [elpa] master ebc0b99 013/271: Add rollover font lock optimization., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 615ce2c 004/271: Wow, actually works., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 6d79b91 024/271: Idly colorizing after changes working. Cancelling seemingly not working., Jackson Ray Hamilton, 2015/02/05
- [elpa] master fd4b629 007/271: Add mode., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 6e991c4 014/271: Fix off-by-one error., Jackson Ray Hamilton, 2015/02/05
- [elpa] master b35380b 019/271: Vastly improve idle timer strategy., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 7ac8db6 012/271: Fix a bug where strings were matched.,
Jackson Ray Hamilton <=
- [elpa] master 806398e 016/271: Use asynchronous command execution strategy., Jackson Ray Hamilton, 2015/02/05
- [elpa] master d0f5470 022/271: Successfully lexically bind buffer., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 397ef04 005/271: Detect globals., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 409a05b 017/271: Enable font lock again., Jackson Ray Hamilton, 2015/02/05
- [elpa] master a72314c 008/271: Write temp files., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 6a2a7df 018/271: Use idle timers instead of font lock., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 0a4248b 009/271: Update chunk size., Jackson Ray Hamilton, 2015/02/05
- [elpa] master ffd69f5 026/271: Minutia., Jackson Ray Hamilton, 2015/02/05
- [elpa] master f349ecb 027/271: Minutia., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 35453e0 015/271: Only color changed regions., Jackson Ray Hamilton, 2015/02/05