;; Author: Jackson Ray Hamilton <jackson@jacksonrayhamilton.com>
;; Keywords: context coloring syntax highlighting
;; Version: 1.0.0
-;; Package-Requires: ((emacs "24"))
+;; Package-Requires: ((emacs "24") (js2-mode "20141118"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;;; Code:
+(require 'js2-mode)
+
;;; Constants
(defcustom context-coloring-face-count 7
"Number of faces defined for highlighting delimiter levels.
-Determines level at which to cycle through faces again.")
+Determines level at which to cycle through faces again."
+ :group 'context-coloring)
;;; Face functions
;; accumulates the chunks into a message.
(set-process-filter
context-coloring-scopifier-process
- (lambda (process chunk)
+ (lambda (_process chunk)
(setq output (concat output chunk))))
;; When the process's message is complete, this sentinel parses it as JSON
;; and applies the tokens to the buffer.
(set-process-sentinel
context-coloring-scopifier-process
- (lambda (process event)
+ (lambda (_process event)
(when (equal "finished\n" event)
(let ((tokens (context-coloring-parse-array output)))
(with-current-buffer buffer
(interactive)
(context-coloring-dispatch))
-(defun context-coloring-change-function (start end length)
+(defun context-coloring-change-function (_start _end _length)
"Registers a change so that a context-colored buffer can be
colorized soon."
;; Tokenization is obsolete if there was a change.
FIXTURE."
`(context-coloring-test-with-fixture
,fixture
- (add-to-list 'load-path (context-coloring-test-resolve-path "./fixtures/js2-mode"))
+ (add-to-list 'load-path (context-coloring-test-resolve-path "../lib/js2-mode"))
(require 'js2-mode)
(setq js2-mode-show-parse-errors nil)
(setq js2-mode-show-strict-warnings nil)