Permalink
Browse files

Fix a compile error

web-beautify.el:193:1:Error: the following functions are not known to be
defined: web-mode-reload, js2-mode
  • Loading branch information...
1 parent d1eea45 commit 3c918fcbfeb454776708cef3da99db6ed359acf2 @yasuyk committed Apr 10, 2016
Showing with 55 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +20 −0 .travis.yml
  3. +3 −0 Cask
  4. +29 −0 Makefile
  5. +2 −0 web-beautify.el
View
@@ -0,0 +1 @@
+.cask
View
@@ -0,0 +1,20 @@
+language: emacs-lisp
+env:
+ matrix:
+ - EMACS=emacs24
+ # - EMACS=emacs-snapshot
+ global:
+ - CASK=$HOME/.cask/bin/cask
+before_install:
+ - sudo add-apt-repository -y ppa:cassou/emacs
+ - sudo add-apt-repository -y ppa:ubuntu-elisp/ppa
+ - sudo apt-get update -qq
+ - sudo apt-get install -qq $EMACS
+ - if [ "$EMACS" = 'emacs-snapshot' ]; then
+ sudo apt-get install -qq emacs-snapshot-el emacs-snapshot-nox;
+ fi
+ - sudo apt-get install -qq global
+ - curl -fsSkL --max-time 10 --retry 10 --retry-delay 10
+ https://raw.github.com/cask/cask/master/go | python
+script:
+ make test
View
@@ -0,0 +1,3 @@
+(source melpa)
+
+(package-file "web-beautify.el")
View
@@ -0,0 +1,29 @@
+TAEGET ?= web-beautify.el
+EMACS ?= emacs
+CASK ?= cask
+
+.PHONY : test
+
+EMACS ?= emacs
+CASK ?= cask
+
+ELPA_DIR = \
+ .cask/$(shell $(EMACS) -Q --batch --eval '(princ emacs-version)')/elpa
+
+test: elpa test-compile
+ $(CASK) exec $(EMACS) -Q -batch $(LOADPATH) \
+ $(patsubst %,-l %,$(wildcard test/test-*.el)) \
+ -f ert-run-tests-batch-and-exit
+
+test/test-%: elpa
+ $(CASK) exec $(EMACS) -Q -batch $(LOADPATH) \
+ -l $@ \
+ -f ert-run-tests-batch-and-exit
+
+test-compile:
+ $(CASK) exec $(EMACS) -batch -Q -L . -eval "(progn (setq byte-compile-error-on-warn t) (batch-byte-compile))" $(TAEGET)
+
+elpa: $(ELPA_DIR)
+$(ELPA_DIR): Cask
+ $(CASK) install
+ touch $@
View
@@ -88,6 +88,8 @@
"Join PROGRAM with the constant js-beautify args."
(mapconcat 'identity (append (list program) web-beautify-args) " "))
+(declare-function web-mode-reload "ext:web-mode")
+(declare-function js2-mode "ext:js2-mode")
(defun web-beautify-reload ()
"Reload mode to activate faces."

0 comments on commit 3c918fc

Please sign in to comment.