]> code.delx.au - gnu-emacs-elpa/blobdiff - context-coloring.el
Only set defaults when the mode is enabled.
[gnu-emacs-elpa] / context-coloring.el
index 3a05bc2afe8dfe98b2f08e7b6f260d03d3c3489c..bf1d53399f65d2ca038dddc88a0d8d5cb7276182 100644 (file)
@@ -193,7 +193,6 @@ the END point (exclusive) with the face corresponding to LEVEL."
                                                 (or max (point-max)))
         ;; TODO: Make configurable at the dispatch level.
         (when (eq major-mode 'emacs-lisp-mode)
-          (font-lock-set-defaults)
           (font-lock-fontify-keywords-region (or min (point-min))
                                              (or max (point-max))))))))
 
@@ -1432,6 +1431,9 @@ elisp tracks, and asynchronously for shell command tracks."
     (font-lock-mode 0)
     (jit-lock-mode nil)
 
+    ;; ...but we do use font-lock functions here.
+    (font-lock-set-defaults)
+
     ;; Safely change the valye of this function as necessary.
     (make-local-variable 'font-lock-syntactic-face-function)