emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master 97194c7 023/271: Apply tokens with lexically-bound buffer


From: Jackson Ray Hamilton
Subject: [elpa] master 97194c7 023/271: Apply tokens with lexically-bound buffer as current.
Date: Thu, 05 Feb 2015 18:29:30 +0000

branch: master
commit 97194c7d48b14528ff9e6a44ae3bd8b82aa566a3
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Apply tokens with lexically-bound buffer as current.
---
 context-coloring.el |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/context-coloring.el b/context-coloring.el
index 2b7e33c..16ef241 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -80,10 +80,12 @@ For example: \"context-coloring-depth-1-face\"."
 
 ;;; Path constants
 
-(defconst context-coloring-path (file-name-directory (or load-file-name 
buffer-file-name))
+(defconst context-coloring-path
+  (file-name-directory (or load-file-name buffer-file-name))
   "This file's directory.")
 
-(defconst context-coloring-tokenizer-path (expand-file-name "./bin/tokenizer" 
context-coloring-path)
+(defconst context-coloring-tokenizer-path
+  (expand-file-name "./bin/tokenizer" context-coloring-path)
   "Path to the external tokenizer executable.")
 
 
@@ -128,7 +130,8 @@ calling FUNCTION with the parsed list of tokens."
                             (when (equal "finished\n" event)
                               (let ((tokens (let ((json-array-type 'list))
                                               (json-read-from-string output))))
-                                (context-coloring-apply-tokens tokens)
+                                (with-current-buffer buffer
+                                  (context-coloring-apply-tokens tokens))
                                 (message "%s (%f)" "Colorization complete." 
(float-time)))))))
 
   ;; Give the process its input.



reply via email to

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