From 6c8175e6b73a20b517dd9e7ecb1ebf30b310030e Mon Sep 17 00:00:00 2001 From: Jackson Ray Hamilton Date: Mon, 22 Dec 2014 02:51:56 -0800 Subject: [PATCH] Update compilation. --- Makefile | 4 +++- benchmark/context-coloring-benchmark.el | 2 +- context-coloring.el | 13 ++++++++----- {test/fixtures => lib}/js2-mode/.dir-locals.el | 0 {test/fixtures => lib}/js2-mode/js2-mode.el | 0 test/context-coloring-test.el | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) rename {test/fixtures => lib}/js2-mode/.dir-locals.el (100%) rename {test/fixtures => lib}/js2-mode/js2-mode.el (100%) diff --git a/Makefile b/Makefile index aa9f9f650..1e5e6d5b4 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,9 @@ benchjs: node_modules/.bin/matcha compile: - emacs -Q -batch -f batch-byte-compile *.el + emacs -Q \ + -L lib/js2-mode \ + -batch -f batch-byte-compile *.el clean: rm -f *.log benchmark/*.log *.elc diff --git a/benchmark/context-coloring-benchmark.el b/benchmark/context-coloring-benchmark.el index 4403fe878..1da2b8cdd 100644 --- a/benchmark/context-coloring-benchmark.el +++ b/benchmark/context-coloring-benchmark.el @@ -42,7 +42,7 @@ (defun context-coloring-benchmark-js2-mode-setup () (add-to-list 'load-path (context-coloring-benchmark-resolve-path - "../test/fixtures/js2-mode")) + "../lib/js2-mode")) (require 'js2-mode) (setq js2-mode-show-parse-errors nil) (setq js2-mode-show-strict-warnings nil) diff --git a/context-coloring.el b/context-coloring.el index e3ea326b0..09bee0cdc 100644 --- a/context-coloring.el +++ b/context-coloring.el @@ -5,7 +5,7 @@ ;; Author: Jackson Ray Hamilton ;; 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 @@ -38,6 +38,8 @@ ;;; Code: +(require 'js2-mode) + ;;; Constants @@ -171,7 +173,8 @@ imply that it should be colorized again.") (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 @@ -326,14 +329,14 @@ parsed list of tokens to `context-coloring-apply-tokens'." ;; 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 @@ -401,7 +404,7 @@ of the current buffer, then does it." (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. diff --git a/test/fixtures/js2-mode/.dir-locals.el b/lib/js2-mode/.dir-locals.el similarity index 100% rename from test/fixtures/js2-mode/.dir-locals.el rename to lib/js2-mode/.dir-locals.el diff --git a/test/fixtures/js2-mode/js2-mode.el b/lib/js2-mode/js2-mode.el similarity index 100% rename from test/fixtures/js2-mode/js2-mode.el rename to lib/js2-mode/js2-mode.el diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el index 9b17a369a..633aec4d7 100644 --- a/test/context-coloring-test.el +++ b/test/context-coloring-test.el @@ -24,7 +24,7 @@ FIXTURE." 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) -- 2.39.2