Skip to content

Commit 5474167

Browse files
committed
adds check-compile target and fixes comp warnings
1 parent e8a9989 commit 5474167

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

Makefile

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
.PHONY: help test
1+
2+
.PHONY: help test deps check-compile
23

34
define DEPS_SCRIPT
45
(progn
@@ -14,8 +15,10 @@ export DEPS_SCRIPT
1415

1516
help:
1617
@echo "Available commands:"
17-
@echo " make deps Install dependencies"
18-
@echo " make test Run the tests"
18+
@echo " make deps Install dependencies"
19+
@echo " make test Run the tests"
20+
@echo " make compile Byte-compile the package"
21+
@echo " make check-compile Check for clean byte-compilation"
1922

2023
deps:
2124
@echo "Installing dependencies"
@@ -25,3 +28,16 @@ test:
2528
emacs --batch --funcall package-initialize --directory . \
2629
--eval '(add-to-list '\''load-path "..")' \
2730
--funcall buttercup-run-discover
31+
32+
check-compile: deps
33+
@echo "Checking byte-compilation..."
34+
emacs -Q --batch \
35+
--eval "(require 'package)" \
36+
--eval "(setq package-user-dir \"$(CURDIR)/.elpa\")" \
37+
--eval "(add-to-list 'package-archives '(\"melpa\" . \"http://melpa.org/packages/\"))" \
38+
--eval "(package-initialize)" \
39+
--eval "(package-install 'consult)" \
40+
--eval "(package-install 'ts)" \
41+
--eval "(setq byte-compile-error-on-warn t)" \
42+
--eval "(add-to-list 'load-path \".\")" \
43+
--eval "(byte-compile-file \"consult-hn.el\")"

consult-hn.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ timestamp value must be in utc timezone."
206206
found)))
207207

208208
(defvar url-http-end-of-headers) ; used by url-http
209+
(defvar nb-pages)
209210

210211
(defun consult-hn--fetch-page-async (input page async expected-search &optional buffer-callback)
211212
"Fetch a single page asynchronously.

0 commit comments

Comments
 (0)