Skip to content

Fix byte-compile warnings - #19

Merged
conao3 merged 1 commit into
masterfrom
fix/compile-warnings
Oct 29, 2026
Merged

conao3 merged 1 commit into
masterfrom
fix/compile-warnings

Conversation

@conao3

@conao3 conao3 commented Oct 29, 2026

Copy link
Copy Markdown
Member

Fixes #16.

shut-up-write-region-original and shut-up-load-original are defined with fset at load time, so the byte compiler and the native compiler warn that they are not known to be defined. They are now declared with declare-function. The fset stays as it is, so loading shut-up twice still keeps the original definitions (#12).

find-file-hooks is obsolete since Emacs 22.1 and warns on Emacs 27 and later, so it is replaced with find-file-hook.

A new compile target byte-compiles shut-up.el with warnings treated as errors, and make test runs it first, so CI catches new warnings.

This PR is stacked on #18. Once that is merged, the base switches to master automatically.

Test plan

  • make test passes with no compile warnings on Emacs 25.3, 26.3, 27.2, 28.2, 29.4 and 30.2
  • native-compile on Emacs 31.1 reports no warnings (before this change it reported the two warnings from Native compilation issues #16)
  • make compile fails when a warning is reintroduced
  • The CI run on this PR passes for every Emacs version

Assisted-by: Claude Code:claude-opus-5-5

shut-up-write-region-original and shut-up-load-original are defined
with fset at load time, so the byte compiler and the native compiler
warn that they are not known to be defined. Declare them with
declare-function.

find-file-hooks is obsolete since Emacs 22.1. Use find-file-hook.

Add a compile target that treats warnings as errors and run it before
the tests, so CI catches new warnings.

Fixes #16.
@conao3
conao3 changed the base branch from ci/github-actions to master October 29, 2026 04:47
@conao3 conao3 closed this Oct 29, 2026
@conao3 conao3 reopened this Oct 29, 2026
@conao3
conao3 merged commit 2f015df into master Oct 29, 2026
7 checks passed
@twmr

twmr commented Oct 29, 2026

Copy link
Copy Markdown

Awesome. Thx a lot @conao3 !

@conao3
conao3 deleted the fix/compile-warnings branch October 29, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native compilation issues

2 participants