diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e911e9a81..c22b312d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: - 25.3 - 26.3 - 27.1 - - snapshot + - 29.2 steps: - uses: purcell/setup-emacs@master with: diff --git a/Makefile b/Makefile index 2144a921b..22f78d45c 100644 --- a/Makefile +++ b/Makefile @@ -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. @@ -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}))" diff --git a/evil-commands.el b/evil-commands.el index 62a659722..10797a58d 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -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") diff --git a/evil-types.el b/evil-types.el index 33f73c41d..395dc2fa6 100644 --- a/evil-types.el +++ b/evil-types.el @@ -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