branch: master commit c8a1710e71236f4d8871a59ee2333fe48cbf9fad Author: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com> Commit: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com>
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)