[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0a4248b 009/271: Update chunk size.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 0a4248b 009/271: Update chunk size. |
Date: |
Thu, 05 Feb 2015 18:29:23 +0000 |
branch: master
commit 0a4248b26cf37980d0668c14abaeb586f0a870e4
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Update chunk size.
---
context-coloring.el | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index d498bbd..47952bb 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -94,7 +94,7 @@ Return the name of the temporary file."
(defconst context-coloring-path
(file-name-directory (or load-file-name buffer-file-name)))
-(defun context-coloring-propertize-region (start end)
+(defun context-coloring-fontify-region (start end)
(interactive)
(let* ((temp-file (context-coloring-save-buffer-to-temp))
(json (shell-command-to-string
@@ -112,7 +112,8 @@ Return the name of the temporary file."
(start (context-coloring-get-point line (- from 1)))
(end (context-coloring-get-point line (- thru 1)))
(face (context-coloring-depth-face level)))
- (add-text-properties start end `(font-lock-face ,face rear-nonsticky
t)))))))
+ (add-text-properties start end `(font-lock-face ,face rear-nonsticky
t)))))
+ (delete-file temp-file)))
;;; Minor mode:
@@ -120,10 +121,16 @@ 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-chunk-size)
+ (make-local-variable 'jit-lock-contextually)
(if (not context-coloring-mode)
(progn
- (jit-lock-unregister 'context-coloring-propertize-region))
- (jit-lock-register 'context-coloring-propertize-region)))
+ (setq jit-lock-chunk-size 500)
+ (setq jit-lock-contextually `syntax-driven)
+ (jit-lock-unregister 'context-coloring-fontify-region))
+ (setq jit-lock-chunk-size 536870911)
+ (setq jit-lock-contextually nil)
+ (jit-lock-register 'context-coloring-fontify-region)))
;;;###autoload
(defun context-coloring-mode-enable ()
- [elpa] master fd4b629 007/271: Add mode., (continued)
- [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, 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 <=
- [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
- [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