Repository navigation
Fix byte-compile warnings - #19
Merged
Merged
Conversation
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.
|
Awesome. Thx a lot @conao3 ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16.
shut-up-write-region-originalandshut-up-load-originalare defined withfsetat load time, so the byte compiler and the native compiler warn that they are not known to be defined. They are now declared withdeclare-function. Thefsetstays as it is, so loading shut-up twice still keeps the original definitions (#12).find-file-hooksis obsolete since Emacs 22.1 and warns on Emacs 27 and later, so it is replaced withfind-file-hook.A new
compiletarget byte-compilesshut-up.elwith warnings treated as errors, andmake testruns it first, so CI catches new warnings.This PR is stacked on #18. Once that is merged, the base switches to
masterautomatically.Test plan
make testpasses with no compile warnings on Emacs 25.3, 26.3, 27.2, 28.2, 29.4 and 30.2native-compileon Emacs 31.1 reports no warnings (before this change it reported the two warnings from Native compilation issues #16)make compilefails when a warning is reintroducedAssisted-by: Claude Code:claude-opus-5-5