Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: CI: enable check for lack of new warnings while byte-compiling #1860

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- 25.3
- 26.3
- 27.1
- snapshot
- 29.2
steps:
- uses: purcell/setup-emacs@master
with:
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ compile: $(ELCFILES)

-include .depend

# These functions are only part of newer Emacs, but they cause byte-compilation
# warnings on older ones. So pre-declare them to suppress these warnings
OLDER_EMACS_DEFUNS = "(progn (defun undo-redo ()) (defun minibuffer-history-value()) (defun switch-to-minibuffer()))"

$(ELCFILES): %.elc: %.el
$(EMACS) --batch -Q -L . -f batch-byte-compile $<
$(EMACS) --batch -Q -L . --eval $(OLDER_EMACS_DEFUNS) \
--eval "(setq byte-compile-error-on-warn t)" -f batch-byte-compile $<

# Byte-compile all files in one batch. This is faster than
# compiling each file in isolation, but also less stringent.
Expand Down Expand Up @@ -55,7 +60,7 @@ clean:
# The TAG variable may specify a test tag or a test name:
# make test TAG=repeat
# This will only run tests pertaining to the repeat system.
test:
test: compile
$(EMACS) -nw -Q --batch -L . -l evil-tests.el \
--eval "(evil-tests-initialize '(${TAG}) '(${PROFILER}))"

Expand Down
6 changes: 6 additions & 0 deletions evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
(require 'evil-vars)
(require 'cl-lib)
(require 'reveal)
(require 'seq)
(require 'tab-bar)

;; older Emacses had some core functions declared in subr-x.
(when (< emacs-major-version 29)
(require 'subr-x))

(declare-function imenu--in-alist "imenu")

Expand Down
2 changes: 1 addition & 1 deletion evil-types.el
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ If the end position is at the beginning of a line, then:
Handling for `evil-want-visual-char-semi-exclusive' is deprecated,
and will be removed in a future version."
:expand (lambda (beg end)
(if (and evil-want-visual-char-semi-exclusive
(if (and (with-no-warnings evil-want-visual-char-semi-exclusive)
(evil-visual-state-p)
(< beg end)
(save-excursion
Expand Down
Loading