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

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

[elpa] master c8a1710 100/271: Add message about needing Node.js.


From: Jackson Ray Hamilton
Subject: [elpa] master c8a1710 100/271: Add message about needing Node.js.
Date: Thu, 05 Feb 2015 18:30:12 +0000

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

    Add message about needing Node.js.
---
 context-coloring.el |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/context-coloring.el b/context-coloring.el
index c993540..6ecc821 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -275,10 +275,11 @@ applying a parsed list of tokens to
 (defun context-coloring-colorize ()
   "Colors the current buffer by function context."
   (interactive)
-  (when context-coloring-benchmark-colorization
-    (setq context-coloring-start-time (float-time))
-    (message "%s" "Colorizing..."))
-  (context-coloring-scopify))
+  (when (executable-find "node")
+    (when context-coloring-benchmark-colorization
+      (setq context-coloring-start-time (float-time))
+      (message "%s" "Colorizing..."))
+    (context-coloring-scopify)))
 
 (defun context-coloring-change-function (start end length)
   "Registers a change so that a context-colored buffer can be
@@ -316,6 +317,9 @@ colorizing would be redundant."
     ;; Remember this buffer. This value should not be dynamically-bound.
     (setq context-coloring-buffer (current-buffer))
 
+    (if (null (executable-find "node"))
+        (message "context-coloring-mode requires Node.js 0.10+ to be 
installed"))
+
     ;; Colorize once initially.
     (context-coloring-colorize)
 



reply via email to

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