Skip to content

Commit 56ef155

Browse files
committed
Fix byte-compile warning and treat warnings as errors in CI
Add declare-function for global-hl-line-unhighlight to silence the byte-compiler. Set byte-compile-error-on-warn in both CI and the Makefile so future warnings break the build.
1 parent a9a07f1 commit 56ef155

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- name: Byte-compile
2525
run: |
2626
emacs --batch -Q -L . \
27+
--eval "(setq byte-compile-error-on-warn t)" \
2728
-f batch-byte-compile \
2829
ghostel.el ghostel-debug.el
2930

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ melpazoid:
2727
make -C "$(MELPAZOID_DIR)"
2828

2929
byte-compile:
30-
$(EMACS) --batch -Q -L . -f batch-byte-compile ghostel.el ghostel-debug.el
30+
$(EMACS) --batch -Q -L . --eval "(setq byte-compile-error-on-warn t)" -f batch-byte-compile ghostel.el ghostel-debug.el
3131

3232
bench:
3333
bash bench/run-bench.sh

ghostel.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ These keys pass through to Emacs instead."
311311
(declare-function ghostel--write-input "ghostel-module")
312312
(declare-function package-desc-version "package" (pkg-desc))
313313
(declare-function package-version-join "package" (vlist))
314+
(declare-function global-hl-line-unhighlight "hl-line")
314315

315316

316317
;;; Automatic download and compilation of native module

0 commit comments

Comments
 (0)