[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master ce8ac8e 02/25: Add context-coloring-before-colorize abstra

From: Jackson Ray Hamilton
Subject: [elpa] master ce8ac8e 02/25: Add context-coloring-before-colorize abstraction.
Date: Mon, 30 May 2016 22:10:44 +0000 (UTC)

branch: master
commit ce8ac8e32a952668f1bee67e1c834c6b0a65df26
Author: Jackson Hamilton <address@hidden>
Commit: Jackson Hamilton <address@hidden>

    Add context-coloring-before-colorize abstraction.
 context-coloring.el |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/context-coloring.el b/context-coloring.el
index e5b5a73..0a8e22c 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -1268,10 +1268,15 @@ override `context-coloring-default-delay'.
               (when (funcall predicate)
                 properties)) context-coloring-dispatch-predicates))))
+(defun context-coloring-before-colorize ()
+  "Set up environment for colorization."
+  (context-coloring-update-maximum-face))
 (defun context-coloring-dispatch ()
   "Determine how to color the current buffer, and color it."
   (let* ((dispatch (context-coloring-get-current-dispatch))
          (colorizer (plist-get dispatch :colorizer)))
+    (context-coloring-before-colorize)
     (catch 'interrupted
       (funcall colorizer))))
@@ -1281,7 +1286,6 @@ override `context-coloring-default-delay'.
 (defun context-coloring-colorize ()
   "Color the current buffer by function context."
-  (context-coloring-update-maximum-face)
 (defun context-coloring-colorize-with-buffer (buffer)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]