[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master fc81cf9 157/271: Don't use timers for js2-mode.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master fc81cf9 157/271: Don't use timers for js2-mode. |
Date: |
Thu, 05 Feb 2015 18:30:45 +0000 |
branch: master
commit fc81cf9d788349fcafffb8fa91ea7b84839e0860
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Don't use timers for js2-mode.
---
context-coloring.el | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 61d3807..986d90d 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -458,16 +458,18 @@ colorizing would be redundant."
(context-coloring-colorize)
;; (message "Elapsed time: %f" (- (float-time) start-time)))
- ;; Only recolor on change.
(cond
((equal major-mode 'js2-mode)
- (add-hook 'js2-post-parse-callbacks 'context-coloring-change-function
nil t))
+ ;; Only recolor on reparse.
+ (add-hook 'js2-post-parse-callbacks 'context-coloring-colorize nil t))
(t
+ ;; Only recolor on change.
(add-hook 'after-change-functions 'context-coloring-change-function nil
t)))
- ;; Only recolor idly.
- (setq context-coloring-colorize-idle-timer
- (run-with-idle-timer context-coloring-delay t
'context-coloring-maybe-colorize))))
+ (when (not (equal major-mode 'js2-mode))
+ ;; Only recolor idly.
+ (setq context-coloring-colorize-idle-timer
+ (run-with-idle-timer context-coloring-delay t
'context-coloring-maybe-colorize)))))
(provide 'context-coloring)
- [elpa] master 6c8175e 153/271: Update compilation., (continued)
- [elpa] master 6c8175e 153/271: Update compilation., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 4f57f0c 163/271: Improve global test., Jackson Ray Hamilton, 2015/02/05
- [elpa] master dc8e99c 130/271: Function name., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 2bb4d12 124/271: More cleanup., Jackson Ray Hamilton, 2015/02/05
- [elpa] master d301048 154/271: Update compilation again., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 1d9cf42 164/271: Refactor tests., Jackson Ray Hamilton, 2015/02/05
- [elpa] master a0ccc5c 162/271: Improve and pass catch test., Jackson Ray Hamilton, 2015/02/05
- [elpa] master c8fa33f 170/271: Improve async benchmarking., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 7954efc 110/271: Rename instances of depth to level., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 338716d 161/271: Refactor., Jackson Ray Hamilton, 2015/02/05
- [elpa] master fc81cf9 157/271: Don't use timers for js2-mode.,
Jackson Ray Hamilton <=
- [elpa] master b4c220a 159/271: Always remove hooks., Jackson Ray Hamilton, 2015/02/05
- [elpa] master e040ca0 181/271: Just use stable emacs., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 9e7ee77 155/271: Add catch test. Don't uncolorize., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 665a54a 167/271: Add more js-mode tests., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 43f2e3b 168/271: Increase reliability of async tests., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 28183e4 188/271: Readme., Jackson Ray Hamilton, 2015/02/05
- [elpa] master bdfdbe4 151/271: Improve benchmarks., Jackson Ray Hamilton, 2015/02/05
- [elpa] master d27f2fe 182/271: Fix callback removal., Jackson Ray Hamilton, 2015/02/05
- [elpa] master cb0644a 136/271: Cleanup JavaScript tests., Jackson Ray Hamilton, 2015/02/05
- [elpa] master c1e9226 171/271: Reorganize lib., Jackson Ray Hamilton, 2015/02/05