]> code.delx.au - gnu-emacs-elpa/blobdiff - context-coloring.el
Version 8.0.1.
[gnu-emacs-elpa] / context-coloring.el
index a20bfa6a110a5043fa74f9eb62ff15ab8e0b155c..fd7a81661b1fd7504e0af2cd3c97245c73579687 100644 (file)
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2014-2016  Free Software Foundation, Inc.
 
 ;; Author: Jackson Ray Hamilton <jackson@jacksonrayhamilton.com>
-;; Version: 7.2.1
+;; Version: 8.0.1
 ;; Keywords: convenience faces tools
 ;; Package-Requires: ((emacs "24.3"))
 ;; URL: https://github.com/jacksonrayhamilton/context-coloring
@@ -419,16 +419,15 @@ Feature inspired by Douglas Crockford."
   nil " Context" nil
   (cond
    (context-coloring-mode
-    ;; Font lock is incompatible with this mode; the converse is also true.
-    (font-lock-mode 0)
-    (jit-lock-mode nil)
-    ;; ...but we do use font-lock functions here.
-    (font-lock-set-defaults)
-    ;; Safely change the value of this function as necessary.
-    (make-local-variable 'font-lock-syntactic-face-function)
     (let ((dispatch (context-coloring-get-current-dispatch)))
       (cond
        (dispatch
+        ;; Font lock is incompatible with this mode; the converse is also true.
+        (font-lock-mode 0)
+        ;; ...but we do use font-lock functions here.
+        (font-lock-set-defaults)
+        ;; Safely change the value of this function as necessary.
+        (make-local-variable 'font-lock-syntactic-face-function)
         (let ((setup (plist-get dispatch :setup)))
           (when setup
             (funcall setup))
@@ -443,8 +442,7 @@ Feature inspired by Douglas Crockford."
         (let ((teardown (plist-get dispatch :teardown)))
           (when teardown
             (funcall teardown)))))
-    (font-lock-mode)
-    (jit-lock-mode t))))
+    (turn-on-font-lock-if-desired))))
 
 (provide 'context-coloring)