[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 35453e0 015/271: Only color changed regions.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 35453e0 015/271: Only color changed regions. |
Date: |
Thu, 05 Feb 2015 18:29:26 +0000 |
branch: master
commit 35453e02694a9487b9bc2b17a5dd8224be85c577
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Only color changed regions.
---
context-coloring.el | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 3d88661..b2daac6 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -99,10 +99,12 @@ Return the name of the temporary file."
(json-read-from-string json))))
(with-silent-modifications
(dolist (token tokens)
- (let ((start (cdr (assoc 's token)))
- (end (cdr (assoc 'e token)))
+ (let ((s (cdr (assoc 's token)))
+ (e (cdr (assoc 'e token)))
(face (context-coloring-level-face (cdr (assoc 'l token)))))
- (add-text-properties start end `(font-lock-face ,face rear-nonsticky
t)))))
+ (when (and (>= s start)
+ (<= e end))
+ (add-text-properties s e `(font-lock-face ,face rear-nonsticky
t))))))
(delete-file temp-file)))
;;; Minor mode:
@@ -118,14 +120,14 @@ Return the name of the temporary file."
(progn
(setq jit-lock-stealth-time nil)
(setq jit-lock-chunk-size 500)
- (setq jit-lock-contextually `syntax-driven)
+ ;;(setq jit-lock-contextually `syntax-driven)
(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)
+ ;;(setq jit-lock-contextually nil)
(jit-lock-unregister 'font-lock-fontify-region)
- (jit-lock-register 'context-coloring-fontify-region)))
+ (jit-lock-register 'context-coloring-fontify-region t)))
;;;###autoload
(defun context-coloring-mode-enable ()
- [elpa] master 7ac8db6 012/271: Fix a bug where strings were matched., (continued)
- [elpa] master 7ac8db6 012/271: Fix a bug where strings were matched., Jackson Ray Hamilton, 2015/02/05
- [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 <=
- [elpa] master 222276b 001/271: Init., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 09166f9 021/271: Some progress, probably have to switch back to lexical., Jackson Ray Hamilton, 2015/02/05
- [elpa] master e448e2f 025/271: Cancelling working., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 97194c7 023/271: Apply tokens with lexically-bound buffer as current., Jackson Ray Hamilton, 2015/02/05
- [elpa] master b4b86ac 033/271: Fix after-change-functions with add-hook. Fix nulls., Jackson Ray Hamilton, 2015/02/05
- [elpa] master cce215d 030/271: Add readme., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 169b1f4 028/271: Set JSLint options to not care., Jackson Ray Hamilton, 2015/02/05
- [elpa] master df36161 031/271: Fix screenshot link., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 16e984c 039/271: Update installation instructions., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 3e6f2cf 037/271: Cleanup., Jackson Ray Hamilton, 2015/02/05